I am trying to assign values to certain hidden fields and text fields using MooTools, but I don't get an output in the email. In the email it displays the variable name "{variable_name}".
I use the following code to assign values to some input fields:
$('name').setProperty('value', 'Some Name');
I checked in Firebug and I do see the value assigned to the input fields. But it doesn't seem to submit the values.
Please turn Form Debug on and see what is included in the $_POST array when you submit the form.
Bob
Hi moleculezz,
Please turn Form Debug on and see what is included in the $_POST array when you submit the form.
Bob
As I can see here. It does set those values accordingly, some of them I set to be blank and some I set "n.v.t." to it. Mind you that even the values that I set to "n.v.t." are not shown in the email.
Might it be that leaving a value blank creates a problem?
I can see some places that a key points to another key:
[datum_retour] => [vertrektijd_uur_retour]
I will try to set the empty values to something to see what happens. If you have any insight as to what is going on, please do.
thanks!
Array ( [clientnummer] => 999999 [voorletters] => G [tussenvoegsel] => [achternaam] => Aaren [telefoonnummer] => 55555555 [emailadres] => [email]example@example.com[/email] [datum] => 08/05/2010 [vertrektijd_uur] => 08 [vertrektijd_min] => :05 [hulpmiddel] => geen [aantal_personen] => geen [ophaal_adres] => Schie [ophaal_huisnummer] => 166 [ophaal_plaats] => Rotter [bestemming_adres] => Kuipers [bestemming_huisnummer] => 82 [bestemming_plaats] => Leid [retourrit] => nee [datum_retour] => [vertrektijd_uur_retour] => [vertrektijd_min_retour] => [h_retour_ophaal_adres] => n.v.t. [h_retour_ophaal_huisnummer] => [h_retour_ophaal_plaats] => [h_retour_bestemming_adres] => n.v.t. [h_retour_bestemming_huisnummer] => [h_retour_bestemming_plaats] => [chrono_verification] => dKkjQ [Verzendbutton] => Verzend [298231c0973ea72edf272c2dc3bd2ec7] => 1 [1cf1] => 8693159fad8e859ea999f39732ab8db2 [chronoformname] => vervoeropmaat_new )
But don't know how to do this. Don't know the syntax to retrieve the radio button value and set the other values.
Thanks for your support GreyHead.
<?php
$radio = JRequest::getString('retourrit', '', 'post');
switch ($radio) {
case 'ja':
JRequest::setVar('retour_ophaal_adres', JRequest::getString('bestemming_adres', '', 'post'));
JRequest::setVar('retour_ophaal_huisnummer', JRequest::getString('bestemming_huisnummer', '', 'post'));
JRequest::setVar('retour_ophaal_plaats', JRequest::getString('bestemming_plaats', '', 'post'));
JRequest::setVar('retour_bestemming_adres', JRequest::getString('ophaal_adres', '', 'post'));
JRequest::setVar('retour_bestemming_huisnummer', JRequest::getString('ophaal_huisnummer', '', 'post'));
JRequest::setVar('retour_bestemming_plaats', JRequest::getString('ophaal_plaats', '', 'post'));
break;
case 'nee':
JRequest::setVar('datum_retour', 'n.v.t.');
JRequest::setVar('vertrektijd_uur_retour', 'n.v.t.');
JRequest::setVar('vertrektijd_min_retour', '');
JRequest::setVar('retour_ophaal_adres', 'n.v.t.');
JRequest::setVar('retour_ophaal_huisnummer', '');
JRequest::setVar('retour_ophaal_plaats', '');
JRequest::setVar('retour_bestemming_adres', 'n.v.t.');
JRequest::setVar('retour_bestemming_huisnummer', '');
JRequest::setVar('retour_bestemming_plaats', '');
break;
}
?>