Hi,
I have two fields, the first one is hours and the second are minutes. The both is combo.
I want, before send email, merge these fields and the result will fill other field (maybe hidden)
Is it possible? How do it?
I have two fields, the first one is hours and the second are minutes. The both is combo.
I want, before send email, merge these fields and the result will fill other field (maybe hidden)
Is it possible? How do it?
Hi Muneo,
Yes, you ca do this in the OnSubmit before box:
Bob
Yes, you ca do this in the OnSubmit before box:
<?php
$_POST['hours'] = $_POST['hours'].":".$_POST['minutes'];
?>
Bob
I tried but doesn't work.
Form HTML Field:
And "On Submit code - before sending email":
Form HTML Field:
<label for="hours">Appointment</label>
<select name="hours" size="1" id="hours">
<option value="8" selected="selected">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
</select>:<select name="minutes" size="1" id="minutes">
<option value="00" selected="selected">00</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
</select>
And "On Submit code - before sending email":
<?
php $_POST['hours'] = $_POST['hours'].":".$_POST['minutes'];
?>
Hi Muneo,
Apart from the broken <?php tag that looks OK - what shows up in the debug report?
Bob
Apart from the broken <?php tag that looks OK - what shows up in the debug report?
Bob
In my code, the php come together with <?...
Now, I am trying to merge datapret+horapret (the same idea).
The code for that (in On Submit code - before...) is:
I think that result was "...[datapret] => 16/07/2008 - 3:00 PM..."
But the code above is ignored...
PS: I solved the problem with hours using jquery... ...now, the hours(and minutes) come together in one field...
PS: But I still have problem to merge two fields
_POST: Array ( [nome] => Jorge
[morada] => R. Lourenco
[localidade] => 454454
[distrito] => Viseu
[codpostal] => 2333-333
[datanasc] => 09/07/2008
[telefone] => 333-333-333
[telemovel] => 333-333-333
[email] => jorge.muneo@gmail.com
[datapret] => 16/07/2008
[horapret] => 3:00 PM
[dataalt] => 18/07/2008
[horaalt] => 11:00 AM
[motivo] => 343434343
[urgencia] => Sim )
Now, I am trying to merge datapret+horapret (the same idea).
The code for that (in On Submit code - before...) is:
<?php
$_POST['datapret'] = $_POST['datapret']." - ".$_POST['horapret'];
?>
I think that result was "...[datapret] => 16/07/2008 - 3:00 PM..."
But the code above is ignored...
PS: I solved the problem with hours using jquery... ...now, the hours(and minutes) come together in one field...
PS: But I still have problem to merge two fields
Hi Muneo,
I'm sorry, I no longer understand what you are trying to do and what is, or isn't, working.
Bob
I'm sorry, I no longer understand what you are trying to do and what is, or isn't, working.
Bob
I am trying to merge two fields: datapret + horapret
but, the result was:
In other words, the php code doesn't merge...
<?php
$_POST['datapret'] = $_POST['datapret']." - ".$_POST['horapret'];
?>
but, the result was:
_POST: Array ( [nome] => Jorge
[morada] => R. Lourenco
[localidade] => 454454
[distrito] => Viseu
[codpostal] => 2333-333
[datanasc] => 09/07/2008
[telefone] => 333-333-333
[telemovel] => 333-333-333
[email] => jorge.muneo@gmail.com
[datapret] => 16/07/2008
[horapret] => 3:00 PM
[dataalt] => 18/07/2008
[horaalt] => 11:00 AM
[motivo] => 343434343
[urgencia] => Sim )
In other words, the php code doesn't merge...
Hi Muneo,
You can use the email template and write :
{hours}:{minutes}
Cheers
Max
You can use the email template and write :
{hours}:{minutes}
Cheers
Max
This topic is locked and no more replies can be posted.