Forums

Sender_adress based on radiobutton choise

Polleke 09 Nov, 2021
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)
Polleke 10 Nov, 2021
This is great. I think i can do that.

regards Jan aka Polleke
Polleke 10 Nov, 2021
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
Polleke 10 Nov, 2021
ok. it works. That was quit simple. :-)
So it becomes a part of the forms dataset on creation.
GreyHead 10 Nov, 2021
1 Likes
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
You need to login to be able to post a reply.