Forums

Inputboxes not working after adding radio-button

Daxtrading 08 Dec, 2008
Hello,

I have problem with this form after i added the radiobuton.
I got it to work but now there is no check for the inputboxes required.
This is now only working with the radio button and not with the other fields.

Thanks for your help.

Maarten

Formcode:
<DIV class="form_element cf_heading"><H4 class="cf_text" id="null">Aanmeldingsforumulier Inmaxxa Vermogensbeheer</H4></DIV></DIV>
</DIV><DIV class="form_item" ><DIV class="form_element cf_radiobutton"><LABEL class="cf_label">Aanhef</LABEL><DIV class="float_left"><INPUT name="Aanhef[]" id="Aanhef1" class="radio validate-one-required" type="radio" value="Dhr."<LABEL class="radio_label" for="Aanhef1">Dhr.</LABEL>
<INPUT name="Aanhef[]" id="Aanhef2" class="radio" type="radio" value="Mevr."<LABEL class="radio_label" for="Aanhef2">Mevr.</LABEL><BR></DIV></DIV><DIV class="clear"> </DIV></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Naam</LABEL><INPUT name="text_5" type="text" id="text_5" size="30" maxlength="150" class="cf_inputbox required"></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Voorletters(s)</LABEL><INPUT name="text_7" type="text" id="text_7" size="30" maxlength="150" class="cf_inputbox required"></DIV><DIV class="clear"> </DIV></DIV>
<DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Adres</LABEL><INPUT name="text_8" type="text" id="text_8" size="30" maxlength="150" class="cf_inputbox required"></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Postcode</LABEL><INPUT name="text_9" type="text" id="text_9" size="30" maxlength="150" class="cf_inputbox required"></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Plaats</LABEL><INPUT name="text_10" type="text" id="text_10" size="30" maxlength="150" class="cf_inputbox required"></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Telefoon</LABEL><INPUT name="text_6" type="text" id="text_6" size="30" maxlength="150" class="cf_inputbox required"></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Email</LABEL><INPUT name="text_11" type="text" id="text_11" size="30" maxlength="150" class="cf_inputbox required validate-email"></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_text"><SPAN class="cf_text">Verzoekt Daxtrading het aanmeldingspakket van Inmaxxa te sturen voor:</SPAN></DIV>
<DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_checkbox"><LABEL class="cf_label"></LABEL>
<DIV class="float_left"><input name="producten[]" id="producten1" class="radio validate-one-required" type="checkbox" value="Managed Futures Fdax" />
<LABEL class="check_label" for="producten1">Managed Futures Fdax</LABEL>
<BR>
<input name="producten[]" id="producten2" class="radio" type="checkbox" value="Managed Futures Fti" /><LABEL class="check_label" for="producten2">Managed Futures Fti</LABEL>
<BR>
<input name="producten[]" id="producten3" class="radio" type="checkbox" value="Wereldselectie Turbo's" />
<LABEL class="check_label" for="producten3">Werledselectie Turbo's</LABEL>
<BR>
</DIV></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_button"><INPUT name="undefined" type="submit" value="Verzenden"></DIV><DIV class="clear"> </DIV></DIV>
GreyHead 08 Dec, 2008
Hi Daxtrading,

There's a /> missing in here
<INPUT name="Aanhef[]" id="Aanhef1" class="radio validate-one-required" type="radio" value="Dhr."<LABEL class="radio_label" for="Aanhef1">Dhr.</LABEL>
That might be causing your problem.

Bob
Daxtrading 08 Dec, 2008

Hi Daxtrading,

There's a /> missing in here

<INPUT name="Aanhef[]" id="Aanhef1" class="radio validate-one-required" type="radio" value="Dhr."<LABEL class="radio_label" for="Aanhef1">Dhr.</LABEL>
That might be causing your problem.

Bob

Bob,
Please tell me where it has to be...
Max_admin 08 Dec, 2008
Hi Dax, this should be somewhere in the code you have posted above!

Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Daxtrading 08 Dec, 2008

Hi Dax, this should be somewhere in the code you have posted above!

Max

I am a beginner, so if someone can tell me exactly where i have to change something, that would be very helpfull. :?
GreyHead 08 Dec, 2008
Hi Daxtrading,

It in lines 4/5 of the code you posted earlier - and there's another one in lines 6/7.

Tags need to be closed so if you have a tag that starts <input . . . then there needs to be a /> afterwards to close it. There are at least two places in your code where input tags aren't closed (there may be more, I haven't checked any further).

Some tags close like <input . . . />, others come in pairs like <textarea . . .>...</textarea> or <label . . .> ... </label>

Unclosed tags are almost always bad news as they cause strange problems with your page.

Bob
Daxtrading 09 Dec, 2008
Hi Bob,

The whole day fighting with the form and the only thing i want is to get the field naam under Dhr./Mevr.

see this: http://www.daxtrading.nl/index.php?option=com_chronocontact&chronoformname=Aanmelden

Also, there is a problem with the on submit code after sending.

This is the code:
<p> 
<p> 
</p>
<p><h4><span style="font-family: Georgia;">Dear {Aanhef} {text_3},</p>
<p><br />Wij danken u voor uw aanmelding!</p>
<p><br />Het aanmeldingspakket van Inmaxxa ontvangt u binnen enkele dagen...<br /><br /> <br />Met vriendelijk groet,</p>
<p><br />Daxtrading<br />M. Broekman</span></h4></p>
and this is the result:

Dear Array Johnson,



Wij danken u voor uw aanmelding!


Het aanmeldingspakket van Inmaxxa ontvangt u binnen enkele dagen...


Met vriendelijk groet,


Daxtrading
M. Broekman

GreyHead 09 Dec, 2008
Hi Daxtrading,

If you only want one result returned from a select input or checkbox array then you don't need the [] in the name.

If you want more than one result returned then you need the [] but the result is an array and you'll probably need to 'implode' it before you use it. (I say probably because in some cases ChronoForms will do this for you.)

In this case you have radio buttons so they will only return one result. Make them all have name="Aanhef" and all should be OK.

Bob
GreyHead 09 Dec, 2008
Hi Daxtrading,

From a quick look I think you have misplaced a </div> between the two fields. See my comments - you need to move one of them up a few lines:
<div class="form_item">
  <div class="form_element cf_radiobutton">
    <label class="cf_label">Aanhef</label>
    <div class="float_left">
      <input id="Aanhef1" class="radio validate-one-required" type="radio" value="Hr." name="Aanhef"/>
      <label class="radio_label" for="Aanhef1">Hr.</label>
      <input id="Aanhef2" class="radio" type="radio" value="Mevr." name="Aanhef"/>
      <label class="radio_label" for="Aanhef2">Mevr.</label>
    </div>
  </div>
</div>  <!-- <<< add this one -->
<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Naam</label>
    <input id="text_3" class="cf_inputbox required" type="text" maxlength="150" size="30" name="text_3"/>
  </div>
  <div class="clear">
</div> <!-- <<< remove this one -->
</div>

Bob
Max_admin 09 Dec, 2008
Hi Maarten,

unless Bob posts a new code for you, I always do layouts in tables or get somebody to do the divs stuff, so try to do this with a table layout, its much easier if you are still learning this, if you made a quick search in google you will get many results, that's the best way to learn this stuff!

Regards
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
GreyHead 09 Dec, 2008
Hi Maarten,

It doesn't look as though anything has changed. There's still a misplaced div there somewhere.

If you want to post the whole of your form html here I'll take a look in the morning.

Bob
Daxtrading 10 Dec, 2008
Hi Bob,

This is the code:
<p> 
<DIV class="form_item" ><DIV class="form_element cf_heading"><H4 class="cf_text" id="null">Aanmeldingsformulier Inmaxxa Vermogensbeheer</H4></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_radiobutton"><LABEL class="cf_label">Aanhef</LABEL><DIV class="float_left"><INPUT name="Aanhef" id="Aanhef1" class="radio validate-one-required" type="radio"value="Hr."><LABEL class="radio_label" for="Aanhef1">Hr.</LABEL><INPUT name="Aanhef" id="Aanhef2" class="radio" type="radio"value="Mevr."><LABEL class="radio_label" for="Aanhef2">Mevr.</LABEL>
</DIV>
</DIV>
</DIV>
<DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Naam</LABEL><INPUT name="text_3" type="text" id="text_3" size="30" maxlength="150" class="cf_inputbox required">
</DIV>
</DIV>
<DIV class="clear"> 
<DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Voorletter(s)</LABEL><INPUT name="text_4" type="text" id="text_4" size="30" maxlength="150" class="cf_inputbox required"></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Adres</LABEL><INPUT name="text_5" type="text" id="text_5" size="30" maxlength="150" class="cf_inputbox required"></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Postcode</LABEL><INPUT name="text_6" type="text" id="text_6" size="30" maxlength="150" class="cf_inputbox required"></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Plaats</LABEL><INPUT name="text_2" type="text" id="text_2" size="30" maxlength="150" class="cf_inputbox required"></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Telefoon</LABEL><INPUT name="text_7" type="text" id="text_7" size="30" maxlength="150" class="cf_inputbox validate-numbers"></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_textbox"><LABEL class="cf_label">Email</LABEL><INPUT name="text_8" type="text" id="text_8" size="30" maxlength="150" class="cf_inputbox required validate-email"></DIV><DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_text"><SPAN class="cf_text">Verzoekt Daxtrading het aanmeldingspakket van Inmaxxa te sturen voor:</SPAN></DIV>
<DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_checkbox"><LABEL class="cf_label">Producten Inmaxxa</LABEL><DIV class="float_left"><input name="producten[]" id="producten1" class="radio validate-one-required" type="checkbox" value="Managed Futures Fdax" /><LABEL class="check_label" for="producten1">Managed Futures Fdax</LABEL><BR><input name="producten[]" id="producten2" class="radio" type="checkbox" value="Managed Futures Fti" /><LABEL Class="check_label"for="producten2">Managed Futures Fti</LABEL>
<BR><input name="producten[]" id="producten3" class="radio" type="checkbox" value="Wereldselectie Turbo's" /><LABEL class="check_label" for="producten3">Werledselectie Turbo's</LABEL><BR></DIV></DIV>
<DIV class="clear"> </DIV></DIV><DIV class="form_item" ><DIV class="form_element cf_button"><INPUT name="undefined" type="submit" value="Verzenden"></DIV><DIV class="clear"> </DIV></DIV>
GreyHead 10 Dec, 2008
Hi Daxtrading,

This probably needs tweaking a bit but all the divs are now back in place:
<div class="form_item">
  <div class="form_element cf_heading">
    <h4 class="cf_text" id="null">Aanmeldingsformulier Inmaxxa
    Vermogensbeheer</h4>
  </div>

  <div class="clear"></div>
</div>

<div class="form_item form_element cf_radiobutton">
  <label class="cf_label">Aanhef</label>

  <div class="float_left">
    <input name="Aanhef" id="Aanhef1" class="radio validate-one-required" type=
    "radio" value="Hr."><label class="radio_label" for=
    "Aanhef1">Hr.</label><input name="Aanhef" id="Aanhef2" class="radio" type=
    "radio" value="Mevr."><label class="radio_label" for=
    "Aanhef2">Mevr.</label>
  </div>
</div>

<div class="form_item">
  <div class="form_item form_element cf_textbox">
    <label class="cf_label">Naam</label> <input name="text_3" type="text" id=
    "text_3" size="30" maxlength="150" class="cf_inputbox required">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Voorletter(s)</label> <input name="text_4" type=
    "text" id="text_4" size="30" maxlength="150" class="cf_inputbox required">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Adres</label><input name="text_5" type="text" id=
    "text_5" size="30" maxlength="150" class="cf_inputbox required">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Postcode</label><input name="text_6" type="text"
    id="text_6" size="30" maxlength="150" class="cf_inputbox required">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Plaats</label><input name="text_2" type="text" id=
    "text_2" size="30" maxlength="150" class="cf_inputbox required">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Telefoon</label><input name="text_7" type="text"
    id="text_7" size="30" maxlength="150" class="cf_inputbox validate-numbers">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Email</label><input name="text_8" type="text" id=
    "text_8" size="30" maxlength="150" class=
    "cf_inputbox required validate-email">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_text">
    <span class="cf_text">Verzoekt Daxtrading het aanmeldingspakket van Inmaxxa
    te sturen voor:</span>
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_checkbox">
    <label class="cf_label">Producten Inmaxxa</label>

    <div class="float_left">
      <input name="producten[]" id="producten1" class=
      "radio validate-one-required" type="checkbox" value=
      "Managed Futures Fdax"><label class="check_label" for=
      "producten1">Managed Futures Fdax</label><br>
      <input name="producten[]" id="producten2" class="radio" type="checkbox"
      value="Managed Futures Fti"><label class="check_label" for=
      "producten2">Managed Futures Fti</label><br>
      <input name="producten[]" id="producten3" class="radio" type="checkbox"
      value="Wereldselectie Turbo's"><label class="check_label" for=
      "producten3">Werledselectie Turbo's</label><br>
    </div>
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_button">
    <input name="undefined" type="submit" value="Verzenden">
  </div>

  <div class="clear"></div>
</div>

Bob
GreyHead 11 Dec, 2008
Hi Maarten,

I've no idea - it looks OK here (though messy without the css).

Bob
GreyHead 12 Dec, 2008
Hi Daxtrading,

Probably, you'll need to tweak the css. Tricky as you have to check it out in IE & FF - try using FireBug in FireFox that will let you edit CSS on a live page to start with.

Bob
Daxtrading 13 Dec, 2008
Hi Bob,

I thought i had the solution, but what happens?
In opera en firefox, form is ok, but Bill Gates is the problem.
Can you make something out of this.

thanks and a good weekend,

Maarten
Daxtrading 14 Dec, 2008

Hi Daxtrading,

This probably needs tweaking a bit but all the divs are now back in place:

<div class="form_item">
  <div class="form_element cf_heading">
    <h4 class="cf_text" id="null">Aanmeldingsformulier Inmaxxa
    Vermogensbeheer</h4>
  </div>

  <div class="clear"></div>
</div>

<div class="form_item form_element cf_radiobutton">
  <label class="cf_label">Aanhef</label>

  <div class="float_left">
    <input name="Aanhef" id="Aanhef1" class="radio validate-one-required" type=
    "radio" value="Hr."><label class="radio_label" for=
    "Aanhef1">Hr.</label><input name="Aanhef" id="Aanhef2" class="radio" type=
    "radio" value="Mevr."><label class="radio_label" for=
    "Aanhef2">Mevr.</label>
  </div>
</div>

<div class="form_item">
  <div class="form_item form_element cf_textbox">
    <label class="cf_label">Naam</label> <input name="text_3" type="text" id=
    "text_3" size="30" maxlength="150" class="cf_inputbox required">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Voorletter(s)</label> <input name="text_4" type=
    "text" id="text_4" size="30" maxlength="150" class="cf_inputbox required">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Adres</label><input name="text_5" type="text" id=
    "text_5" size="30" maxlength="150" class="cf_inputbox required">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Postcode</label><input name="text_6" type="text"
    id="text_6" size="30" maxlength="150" class="cf_inputbox required">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Plaats</label><input name="text_2" type="text" id=
    "text_2" size="30" maxlength="150" class="cf_inputbox required">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Telefoon</label><input name="text_7" type="text"
    id="text_7" size="30" maxlength="150" class="cf_inputbox validate-numbers">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Email</label><input name="text_8" type="text" id=
    "text_8" size="30" maxlength="150" class=
    "cf_inputbox required validate-email">
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_text">
    <span class="cf_text">Verzoekt Daxtrading het aanmeldingspakket van Inmaxxa
    te sturen voor:</span>
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_checkbox">
    <label class="cf_label">Producten Inmaxxa</label>

    <div class="float_left">
      <input name="producten[]" id="producten1" class=
      "radio validate-one-required" type="checkbox" value=
      "Managed Futures Fdax"><label class="check_label" for=
      "producten1">Managed Futures Fdax</label><br>
      <input name="producten[]" id="producten2" class="radio" type="checkbox"
      value="Managed Futures Fti"><label class="check_label" for=
      "producten2">Managed Futures Fti</label><br>
      <input name="producten[]" id="producten3" class="radio" type="checkbox"
      value="Wereldselectie Turbo's"><label class="check_label" for=
      "producten3">Werledselectie Turbo's</label><br>
    </div>
  </div>

  <div class="clear"></div>
</div>

<div class="form_item">
  <div class="form_element cf_button">
    <input name="undefined" type="submit" value="Verzenden">
  </div>

  <div class="clear"></div>
</div>

Bob

Hi Bob,

Finaly i found the missing parts, see the coloured text.

<div class="form_item">
<div class="form_item form_element cf_radiobutton">
<label class="cf_label">Aanhef</label>

<div class="float_left">
<input name="Aanhef" id="Aanhef1" class="radio validate-one-required" type=
"radio" value="Hr."><label class="radio_label" for=
"Aanhef1">Hr.</label><input name="Aanhef" id="Aanhef2" class="radio" type=
"radio" value="Mevr."><label class="radio_label" for=
"Aanhef2">Mevr.</label>
</div>
</div>

<div class="clear"></div>
</div>


You can close this one.
GreyHead 14 Dec, 2008
Hi Daxtrading,

Excellent - well hunted down !!

Bob
This topic is locked and no more replies can be posted.