Jump to content

Concatenating form variables


John01

Recommended Posts

Hi

 

I have changed this single input;

<input type="text" name="fromtime[]" value="" placeholder="From Time (hh:mm)" class="forminput" list="timeoptions" />

into two selects;

     <div id="username-wrapper1" class="forminput_wrapper1">
        <select id="houroptions" value="" name="fromhour[]" placeholder="From Hour (hh)" class="forminput1" >
          <option>00</option>

          ...

          <option>23</option>
        </select>

        <select id="minuteoptions" value="" name="fromminutes[]" placeholder="From Minute (mm)" class="forminput1" >
          <option>00</option>

          ...

          <option>59</option>
        </select>
      </div>

ie I have broken down time entry into hours and minute entries. How can I now join the values of hour and minutes with a : (colon) in between into fromtime[] variable and at what location can I do it? Can it be done at form level once values of hour and minutes are assigned or does it have to be done elsewhere?

 

Thanks

 

Regards

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.