Buy Now
Sign in

Sender_adress based on radiobutton choise

Polleke , November 09 2021, 19:36
P
Polleke 32
November 09 2021, 19:36 #397380
Hi
i made a form with 2 names and adresses, and a radiobtn group to choose adress 1 or adress 2.
On submit of the form i would like the adress of person 1 or person 2 on the confirmationscreen and the confirmation e-mail.
So i think :
on the form 2 person with each his own adress (adres_1 and Adres_2)
a radiobtn group with:
O send to person_1
O send to person_2
on the radiobtn 2 events
on = person-1 function set_adress(person_1)
on = person-2 function set_adress(person_2)
And then i should make a (PHP) fnction called set_adress which set a form variable sender_adres to the correct adres (adres_1 or adres_2)
Just do not know how to do that.
Can someone help me.
kind regards Jan
i (still) use v5 on J3.10.3)
GreyHead 65
November 10 2021, 11:48 #397384
 1
 Answer
Hi Polleke,
Please check this FAQ.
Bob
If you'd like to buy me a coffee or two, thank you very much
P
Polleke 32
November 10 2021, 11:58 #397385
This is great. I think i can do that.
regards Jan aka Polleke
P
Polleke 32
November 10 2021, 12:03 #397386
Hi Bob,
just an other small question:
In the FAQ there is an example for v5. It says;
$form->data['email_to_use']
Should email_to_use be an existing (hidden)field (text box or something like that). Or is created as a part of the forms dataset. on filling?
regards Jan
P
Polleke 32
November 10 2021, 12:50 #397387
ok. it works. That was quit simple. :-)
So it becomes a part of the forms dataset on creation.
GreyHead 65
November 10 2021, 12:57 #397388
 1
Hi Jan,
'email_to_use' ia just the name of a new item added to the form data so that you can use it later in the email action.
Bob
If you'd like to buy me a coffee or two, thank you very much