Topic: Has anyone got eform validation to work with radio buttons  (Read 495 times)

Pages: [1]   Go Down

#1: 1-Sep-2008, 07:11 AM

danzzz
Posts: 5

Hi,

If anyone has got eform to work with radio buttons please can the post an example.
Many  thanks,
Dan

#2: 7-Sep-2008, 01:37 PM

glardon
Posts: 18

Yes, i did.

The only thing that still doesn't work is setting a default value. 
One way or the other the checked="checked" attribute is cleared by eform.
Someone any idea?

Cheers
Gino Lardon

Snippet call
Code:
[!eForm? &formid=`ContactForm` &to=`####@####.##` &tpl=`ContactFormTpl` &report=`ContactEmailTpl` &gotoid=`55` &subject=`Vraag of opmerking` &language=`nederlands`!]

Form template
Code:
<div id="errormessage">[+validationmessage+]</div>

<form id="ContactForm" name="ContactForm" method="post" action="[~[*id*]~]">

<fieldset>
        <legend><span>Vraag betreft * </span></legend>   
            <div class="formRowRadio"><input type="radio" checked="checked" name="betreft" value="mezelf" id="mezelf" eform="Vraag betreft::1"  /><label for="mezelf">mezelf</label> </div>   
            <div class="formRowRadio"><input type="radio" name="betreft" value="mijn ouder(s)" id="ouders"><label for="ouders" />mijn ouder(s)</label> </div>
            <div class="formRowRadio"><input type="radio" name="betreft" value="een ander familielid" id="familie"><label for="familie" />een ander familielid</label> </div>   
            <div class="formRowRadio"><input type="radio" name="betreft" value="een kennis of buur" id="kennis"><label for="kennis" />een kennis of buur</label></div>
            <div class="formRowRadio"><input type="radio" name="betreft" value="mijn organisatie" id="organisatie"><label for="organisatie" />mijn organisatie</label></div>
            <div class="formRowRadio"><input type="radio" name="betreft" value="een andere reden" id="ander"><label for="ander" />een andere reden</label></div>
</fieldset>

</form>

E-mail template
Code:
<table>
<tr><td>Betreft</td><td>[+betreft+]</td></tr>
</table>

#3: 7-Sep-2008, 10:22 PM

Testers

ZAP
Posts: 1,619

You could use an eForm event function to set the default value before showing the form if no other value has been submitted.
"Things are not what they appear to be; nor are they otherwise." - Buddha

"Well, gee, Buddha - that wasn't very helpful..." - ZAP

Useful MODx links: documentation | wiki  | forum guidelines  | bugs & requests  | info you should include with your post | commercial support options
Pages: [1]   Go Up
0 Members and 1 Guest are viewing this topic.