var from select

Home Forums Quform PHP var from select

This topic is: resolved
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #12689
    Frens
    Participant

    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

    #12701
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #12707
    Frens
    Participant

    Hi 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 DATABASE

    form 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

    #12711
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #12727
    Frens
    Participant

    Thanks 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

    #12730
    Ally
    Support Staff

    You 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.
    #12734
    Frens
    Participant

    Thanks Ally ,,,works fine !

    #12748
    Frens
    Participant

    Hi

    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

    #12766
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #12789
    Frens
    Participant

    Thanks!

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy