Home › Forums › Quform PHP › var from select
- This topic has 9 replies, 2 voices, and was last updated 10 years, 1 month ago by Frens.
- AuthorPosts
- October 5, 2014 at 10:53 am #12689FrensParticipant
Hi
In my form: sample:
<div class=”quform-input”>
<select class=”quform-tooltip” id=”test” name=”test” >
<option value=””>choose</option>
<option value=”test1″>test1</option>
<option value=”test2″>test2</option>
</select>
</div><div class=”quform-input”>
<select class=”quform-tooltip” id=”date” name=”date” >
<option value=””>choose</option>
<option value=” 2014-11-11″> 2014-11-11</option>
<option value=” 2014-11-14″> 2014-11-14</option>
</select>
</div>if choose (test1, test2 ) i wil something in my email templates (sample)
if choose test1 echo one (in my email templates (sample)
if choose test2 echo two (in my email templates (sample)or if select date 2014-11-11 do something (i wont the result in the mail templates.)
Thanks for comment
October 7, 2014 at 10:23 am #12701AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
October 7, 2014 at 6:06 pm #12707FrensParticipantHi Thanks for comment, but is not wath i mean )sorry for my poor English’
I want a conditional comment from the input in the form, as a new result to the
MAIL TEMPLATE and the DATABASEform weeknumber sample;
<select class=”quform-tooltip” id=”date” name=”date” >
<option value=””>choose</option>
<option value=” 2014-11-11″> 2014-11-11</option>
<option value=” 2014-11-14″> 2014-11-14</option>
</select>sample ;
$date = $date ) (input from the form above)<?php if date = { 2014-10-07
$week_num = date(‘W’, strtotime($a));
}
result is 41
?>i wanth the result (41) as a new line in the email template (as Name, email eg) and to the database as a new record weeknumber
The conditional comment and date-weeknumber is just a sample not my problem. only dont now where to place it…in the process.php and how?regards
October 8, 2014 at 9:58 am #12711AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
October 8, 2014 at 7:53 pm #12727FrensParticipantThanks Ally
For me not working e-mail is ok , but in the database record is empthy
Can you give me the exxact place where to ad the code in the process.php
October 9, 2014 at 4:48 pm #12730AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- This reply was modified 10 years, 1 month ago by Ally.
October 9, 2014 at 6:31 pm #12734FrensParticipantThanks Ally ,,,works fine !
October 12, 2014 at 8:51 pm #12748FrensParticipantHi
For the database dateformat must only yyyy-mm-dd format if i am right
sample
<select class=”quform-tooltip” id=”date” name=”date” >
<option value=””>choose</option>
<option value=” 2014-11-11″> 2014-11-11</option>
<option value=” 2014-11-14″> 2014-11-14</option>
</select>In the email template i wil the european dateformaat dd-mm-yyyy
<?php
$date = $form->getValue(‘date’);
if ($date != ”) {
$date = date(‘d-F-Y’, strtotime($date));
}
echo $date;
?>
So i put the code above in the top of the email template (first table row)But now in the email template got 2 dates of course ;
01-November-2014 (make with the function above
and;
2014-11-01 (from the form)Is there a solution for this? only need the format 01-November-2014
Regards and thanks
October 14, 2014 at 1:05 pm #12766AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
October 14, 2014 at 9:34 pm #12789FrensParticipantThanks!
- AuthorPosts
- You must be logged in to reply to this topic.