FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reload Checkbox data
#1
I have formtools setup and working great with recaptcha, API and validation, except for one issue.

When I have an error in either the PHP validation or the recaptcha validation, the information for teh checked checkboxes do not reload.

I have gone over all of the tutorials, samples, and documentation, but I cannot find anywhere that references the proper syntax for this: here is my code:

PHP Code:
<tr>
    <
td>Color:
      <
label for="nopref" ></label></td>
    <
td><input id="trolleycolor_0" type="checkbox" value="Red"  name="trolleycolor[]" <?php if (@$fields["trolleycolor"] == "Red") echo "checked=\"checked\""?>/>
      <label for="red" >Red</label>
      <br />
      <input id="trolleycolor_1" type="checkbox" value="Teal"  name="trolleycolor[]" <?php if (@$fields["trolleycolor"] == "Teal") echo "checked=\"checked\""?>/>
      <label for="teal" >Teal<br />
      </label>
      <input id="trolleycolor_2" type="checkbox" value="NoPreference"  name="trolleycolor[]" <?php if (@$fields["trolleycolor"] == "NoPreference") echo "checked=\"checked\""?>/>
      <label for="nopref" >No Preference</label></td>
  </tr> 

I have tried several different way to create the php error handler, such as using @$fields["trolleycolor[]"] and @$fields["trolleycolor[Red]"] but as predicted, that didn't work at all, probably because the square brackets aren't valid in that location.

I'm stuck. Does anyone know a way out of this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)