Announcement

Collapse
No announcement yet.

shipping by radio buttons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    shipping by radio buttons

    <select name="SHIPUSERDEFINED">



    <option value="18 August 08">week beginning 18 August 08</option>
    <option value="25 August 08">week beginning 25 August 08</option>
    <option value="01 September 08">week beginning 01 September 08</option>
    <option value="08 September 08">week beginning 08 September 08</option>
    <option value="17 September 08">week beginning 17 September 08</option>
    </select>
    I'm using this code as an include to allow people to choose shipping week, client edits a txt file with this in and it uploads via additional files.

    How do i change it so its radio buttons and not a drop down box, as people are allowing the mouse to change the selection so it causing problems

    #2
    Radio buttons are done with inputs, not selects, so you will need to change that part.
    A radio button group can be done like so:

    <label><input type="radio" name="ShipDates" value="18 August 08">week beginning 18 August 08</label>
    <label><input type="radio" name="ShipDates" value="25 August 08">week beginning 25 August 08</label>

    How is this going to get back to the client, are you using the prompt box redefined, probably a good idea to do so if not, as details will be passed with the order then.

    Comment


      #3
      Yes its on the Shipping User Definable prompt

      Code:
      <tr>
         <td width="60%">
            <actinic:block if="%3cactinic%3avariable%20name%3d%22ShipPrompt001Required%22%20%2f%3e" /><span class="actrequired"></actinic:block>
               Please choose the week you would like your order to be delivered:
            <actinic:block if="%3cactinic%3avariable%20name%3d%22ShipPrompt001Required%22%20%2f%3e" /><span class="actrequired"></actinic:block>
         </td>
         <td width="40%">
         <!--  <input type="text" name="SHIPUSERDEFINED" size="20" maxlength="255" value="<Actinic:Variable Name="ShipUserDefined"/>" /> --> 
        <actinic:block php="true"> 
      include('http://www.xxx.co.uk/acatalog/shipping-dates.txt'); 
      
      </actinic:block>   
      </td>
      </tr>
      My txt file now looks like this

      Code:
      <select name="SHIPUSERDEFINED">
      <form id="form1" name="form1" method="post" action="">
        <p>
          <label>
            <input type="radio" name="RadioGroup1" value="radio" />
            Week beginning 3rd November 08</label>
          <br />
          <label>
            <input type="radio" name="RadioGroup1" value="radio" />
            Week beginning 10th November 08</label>
          <br />
          <label>
            <input type="radio" name="RadioGroup1" value="radio" />
            Week beginning 17th November 08</label>
          <br />
          <label>
            <input type="radio" name="RadioGroup1" value="radio" />
            Week beginning 24th November 08</label>
          <br />
          <label>
            <input type="radio" name="RadioGroup1" value="radio" />
            Week beginning 1st December 08</label>
          <br />
          <label>
            <input type="radio" name="RadioGroup1" value="radio" />
            Week beginning 8th December 08</label>
          <br />
        </p>
        
      </form>
      </select>
      but in the checkout i've still got a drop down box. (Yes i know its using the right txt file as the dates shown are the ones in the radio code)

      testing.pinbrook.net

      Comment


        #4
        doh what a cretin....

        hard coded url in Shipping User Definable prompt

        Comment


          #5
          ok i'm still stuck.

          i've got the radio buttons in the checkout, but i'm not passing the value back to the packing list/invoice.

          code in post one acheived this - but its the drop down, i need radio buttons as to many incorrect dates are being sent by customers scrolling and changing date and not noticing

          post 3 is current code

          Comment


            #6
            It looks to me as if all your input buttons have the wrong name and values. See Lee's post above.

            Mike
            -----------------------------------------

            First Tackle - Fly Fishing and Game Angling

            -----------------------------------------

            Comment


              #7
              ok this is what you need
              <p> <label>
              <input type="radio" name="SHIPUSERDEFINED" value="17th November 08"/>
              Week beginning 17th November 08</label>
              <br />
              <label>
              <input type="radio" name="SHIPUSERDEFINED" value="24th November 08"/>
              Week beginning 24th November 08</label>
              <br />

              </p>

              Comment

              Working...
              X