[TYPO3-english] formhandler radio buttons

bernd wilke t3ng at bernd-wilke.net
Wed Sep 19 11:45:55 CEST 2012


Am 19.09.2012 00:07, schrieb Borislav Pantaleev:
> Hello,
>
>   I am having troubles with getting and reading the data from my radio
> buttons on my contact form (formahandler used).
>
> So my html code goes like this:
> <label class="gender" for="gender_mr">
> <input type="radio" id="gender_mr" name="sender_gender" value="Mr"
> checked=true ###checked_sender_gender_mr###><span>Mr</span>
> </label>
> <label class="gender" for="gender_mrs">
>        <input type="radio" id="gender_mrs" name="sender_gender" value="Mrs"
> ###checked_sender_gender_mrs###><span>Mrs</span>
> </label>
>
> And the question now is how do I get what is checked when sending the form?
> I find the documentation to be of no help.
>
> I am trying something like ###checked_sender_gender###, but it doesn't work.
>
> Thanks
>

my working radioboxes:


mastertemplate.html:
<!-- ###master_salutation### -->
###error_salutation###
<div class="type-check">
	<label for="salutation-female" 
###is_error_salutation###>###LLL:salutation### 
###required_salutation###</label>
	<div>
		<input type="radio" id="salutation-female" 
name="###formValuesPrefix###[salutation]" 
value="###LLL:salutation.female###" 
###checked_salutation_###LLL:salutation.female###### />
		<label for="salutation-female">###LLL:salutation.female###</label>
	</div>
	<div>
		<input type="radio" id="salutation-male" 
name="###formValuesPrefix###[salutation]" 
value="###LLL:salutation.male###" 
###checked_salutation_###LLL:salutation.male###### />
		<label for="salutation-male">###LLL:salutation.male###</label>
	</div>
	<div class="clear"></div>
</div>
<!-- ###master_salutation### -->

----------------------------------------------------
step-1.html:
###master_salutation###

----------------------------------------------------
email-admin.html/email-user.html:
###master_email-line-plain_salutation###
###master_email-line-html_salutation###

----------------------------------------------------
lang.xml:
<label index="salutation">Salutation:</label>
<label index="salutation.male">Mr.</label>
<label index="salutation.female">Mrs.</label>


bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-english mailing list