xml form using lists

  • buzzby
  • Novice
  • Novice
  • buzzby
  • Posts: 25

Post 3+ Months Ago

i have an isml form that uses an xml form to power it (if thats the right wording) the xml gets all the info from the isml and sends it off to the designated recipient(s). currently my form has repetitive fields which i think is causing the xml to break down.

i have 15 rows with 6 fields in each row: firstName, lastName, gender(boy, girl), birthdayDate, birthdayMonth, birthdayYear. the xml file now has this coding for first name:

Code: [ Select ]
<field formid="BDFname1" type="string" mandatory="false" binding="BDFname1" max-length="50" missing-error="forms.hamleysMarketUS.BDFname1" />
    <field formid="BDFname2" type="string" mandatory="false" binding="BDFname2" max-length="50" missing-error="forms.hamleysMarketUS.BDFname2" />
    <field formid="BDFname3" type="string" mandatory="false" binding="BDFname3" max-length="50" missing-error="forms.hamleysMarketUS.BDFname3" />
    <field formid="BDFname4" type="string" mandatory="false" binding="BDFname4" max-length="50" missing-error="forms.hamleysMarketUS.BDFname4" />
    <field formid="BDFname5" type="string" mandatory="false" binding="BDFname5" max-length="50" missing-error="forms.hamleysMarketUS.BDFname5" />
    
  1. <field formid="BDFname1" type="string" mandatory="false" binding="BDFname1" max-length="50" missing-error="forms.hamleysMarketUS.BDFname1" />
  2.     <field formid="BDFname2" type="string" mandatory="false" binding="BDFname2" max-length="50" missing-error="forms.hamleysMarketUS.BDFname2" />
  3.     <field formid="BDFname3" type="string" mandatory="false" binding="BDFname3" max-length="50" missing-error="forms.hamleysMarketUS.BDFname3" />
  4.     <field formid="BDFname4" type="string" mandatory="false" binding="BDFname4" max-length="50" missing-error="forms.hamleysMarketUS.BDFname4" />
  5.     <field formid="BDFname5" type="string" mandatory="false" binding="BDFname5" max-length="50" missing-error="forms.hamleysMarketUS.BDFname5" />
  6.     

thats just 5 rows. there is another 10 that this code is there for. its similar for the other 6 fields. with date you have this going on:
Code: [ Select ]
<field formid="birthdayDate1" type="string" mandatory="false" binding="birthdayDate1" missing-error="forms.marketUS.001">
        <options>
            <option optionid="-" label="forms.hamleysMarketUS.140" value="-"/>
            <option optionid="1" label="forms.hamleysMarketUS.141" value="1"/>
            <option optionid="2" label="forms.hamleysMarketUS.142" value="2"/>
            <option optionid="3" label="forms.hamleysMarketUS.143" value="3"/>
            <option optionid="4" label="forms.hamleysMarketUS.144" value="4"/>
            <option optionid="5" label="forms.hamleysMarketUS.145" value="5"/>
            <option optionid="6" label="forms.hamleysMarketUS.146" value="6"/>
            <option optionid="7" label="forms.hamleysMarketUS.147" value="7"/>
            <option optionid="8" label="forms.hamleysMarketUS.148" value="8"/>
            <option optionid="9" label="forms.hamleysMarketUS.149" value="9"/>
            <option optionid="10" label="forms.hamleysMarketUS.150" value="10"/>
            <option optionid="11" label="forms.hamleysMarketUS.151" value="11"/>
            <option optionid="12" label="forms.hamleysMarketUS.152" value="12"/>
            <option optionid="13" label="forms.hamleysMarketUS.153" value="13"/>
            <option optionid="14" label="forms.hamleysMarketUS.154" value="14"/>
            <option optionid="15" label="forms.hamleysMarketUS.155" value="15"/>
            <option optionid="16" label="forms.hamleysMarketUS.156" value="16"/>
            <option optionid="17" label="forms.hamleysMarketUS.157" value="17"/>
            <option optionid="18" label="forms.hamleysMarketUS.158" value="18"/>
            <option optionid="19" label="forms.hamleysMarketUS.159" value="19"/>
            <option optionid="20" label="forms.hamleysMarketUS.160" value="20"/>
            <option optionid="21" label="forms.hamleysMarketUS.161" value="21"/>
            <option optionid="22" label="forms.hamleysMarketUS.162" value="22"/>
            <option optionid="23" label="forms.hamleysMarketUS.163" value="23"/>
            <option optionid="24" label="forms.hamleysMarketUS.164" value="24"/>
            <option optionid="25" label="forms.hamleysMarketUS.165" value="25"/>
            <option optionid="26" label="forms.hamleysMarketUS.166" value="26"/>
            <option optionid="27" label="forms.hamleysMarketUS.167" value="27"/>
            <option optionid="28" label="forms.hamleysMarketUS.168" value="28"/>
            <option optionid="29" label="forms.hamleysMarketUS.169" value="29"/>
            <option optionid="30" label="forms.hamleysMarketUS.170" value="30"/>
            <option optionid="31" label="forms.hamleysMarketUS.171" value="31"/>
        </options>
    </field>
  1. <field formid="birthdayDate1" type="string" mandatory="false" binding="birthdayDate1" missing-error="forms.marketUS.001">
  2.         <options>
  3.             <option optionid="-" label="forms.hamleysMarketUS.140" value="-"/>
  4.             <option optionid="1" label="forms.hamleysMarketUS.141" value="1"/>
  5.             <option optionid="2" label="forms.hamleysMarketUS.142" value="2"/>
  6.             <option optionid="3" label="forms.hamleysMarketUS.143" value="3"/>
  7.             <option optionid="4" label="forms.hamleysMarketUS.144" value="4"/>
  8.             <option optionid="5" label="forms.hamleysMarketUS.145" value="5"/>
  9.             <option optionid="6" label="forms.hamleysMarketUS.146" value="6"/>
  10.             <option optionid="7" label="forms.hamleysMarketUS.147" value="7"/>
  11.             <option optionid="8" label="forms.hamleysMarketUS.148" value="8"/>
  12.             <option optionid="9" label="forms.hamleysMarketUS.149" value="9"/>
  13.             <option optionid="10" label="forms.hamleysMarketUS.150" value="10"/>
  14.             <option optionid="11" label="forms.hamleysMarketUS.151" value="11"/>
  15.             <option optionid="12" label="forms.hamleysMarketUS.152" value="12"/>
  16.             <option optionid="13" label="forms.hamleysMarketUS.153" value="13"/>
  17.             <option optionid="14" label="forms.hamleysMarketUS.154" value="14"/>
  18.             <option optionid="15" label="forms.hamleysMarketUS.155" value="15"/>
  19.             <option optionid="16" label="forms.hamleysMarketUS.156" value="16"/>
  20.             <option optionid="17" label="forms.hamleysMarketUS.157" value="17"/>
  21.             <option optionid="18" label="forms.hamleysMarketUS.158" value="18"/>
  22.             <option optionid="19" label="forms.hamleysMarketUS.159" value="19"/>
  23.             <option optionid="20" label="forms.hamleysMarketUS.160" value="20"/>
  24.             <option optionid="21" label="forms.hamleysMarketUS.161" value="21"/>
  25.             <option optionid="22" label="forms.hamleysMarketUS.162" value="22"/>
  26.             <option optionid="23" label="forms.hamleysMarketUS.163" value="23"/>
  27.             <option optionid="24" label="forms.hamleysMarketUS.164" value="24"/>
  28.             <option optionid="25" label="forms.hamleysMarketUS.165" value="25"/>
  29.             <option optionid="26" label="forms.hamleysMarketUS.166" value="26"/>
  30.             <option optionid="27" label="forms.hamleysMarketUS.167" value="27"/>
  31.             <option optionid="28" label="forms.hamleysMarketUS.168" value="28"/>
  32.             <option optionid="29" label="forms.hamleysMarketUS.169" value="29"/>
  33.             <option optionid="30" label="forms.hamleysMarketUS.170" value="30"/>
  34.             <option optionid="31" label="forms.hamleysMarketUS.171" value="31"/>
  35.         </options>
  36.     </field>


there is also for the month and year. this happens 15 times, once per row. the reason its 15 is because a total number of 15 people can submit their details (its a promotional thing)

now i have been told that with group/lists i can whittle this down. the form works well if there are only 2 or 3 rows being filled in but if all 15 rows are filled or even if more than 4 rows are filled in the the form falls down.

does anyone know how to do group lists at all?

so far i have seen this:
Code: [ Select ]
 <include formid="address" name="customeraddress"/>
    
    <group formid="addressbook">
        <list formid="addresses">
            <action formid="edit" valid-form="false"/>
            <action formid="remove" valid-form="false"/>
        </list>
        <action formid="add" valid-form="false"/>
    </group>
  1.  <include formid="address" name="customeraddress"/>
  2.     
  3.     <group formid="addressbook">
  4.         <list formid="addresses">
  5.             <action formid="edit" valid-form="false"/>
  6.             <action formid="remove" valid-form="false"/>
  7.         </list>
  8.         <action formid="add" valid-form="false"/>
  9.     </group>

but i dont know how this works or how to use it in conjunction with my isml form

any help would be great

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 22 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.