Form to Email send text fields but not radio buttons value
I use a freeware script from Internet as a form to email and it does very well with text fields and textarea field. I am trying to add some radio buttons to this form but I cannot get the value of them in email. It is blank.
Could you help me please to resolve this issue?
I get the value of Year text field but not the value of radio buttons.
<label for="year" >Year: <span class="required">*</span></label><br/>
<input type="text" name="year" id="year" value="<?php echo $formproc->SafeDisplay('year') ?>" maxlength="50" /><br/>
<p id="form_year_errorloc" class="error"></p>
<label for="drivable" >Is your car drivable? <span class="required">*</span></label><br/>
<input name="drivable" id="drivable-yes" type="radio" value="<?php echo $formproc->SafeDisplay('yes') ?>" />Yes <br />
<input name="drivable" id="drivable-no" type="radio" value="<?php echo $formproc->SafeDisplay('no') ?>" />No
<p id="form_drivable_errorloc" class="error"></p>
See full files attached.
Last edited by geo86; 11-18-2013 at 04:45 PM.
I just run the abode code and it seems to work properly.
Unse the $_POSt method to collect the information from the radio;
Try the following code in the file set at the form action:
Once you do that copy and paste the results here, all data should be there if the method on the form is set to post:
<form action="file.php" method="post">
your code here
The original script doesn't work. (it is running on a live host now).
Originally Posted by kamoiran
The code above displays:
[submitted] => 1
[name] => nume
[drivable] => yes
[Submit] => Send
Last edited by geo86; 11-19-2013 at 02:59 PM.
Reason: misunderstood the above post
I have replaced value="<?php echo $formproc->SafeDisplay('yes') ?>" with value="Yes".
Now is working.
Thank you for your help!
If you are freasher or a final year student
Here is your chance to earn while learn
Get the right start at the right time with the right product for your Bright career.
Know the best about your potential and improvement areas.
Strengthen your Study habits and academics.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread