How can i subscribe to a newsletter by a radio button ?

olizan74 23 Apr, 2020
Hello,
I have a form with radio button "yes" or "no" to subscribe.
How can i link acymailing 5 list with the radio button of chronoform 6 ?
regards
Olivier
Max_admin 23 Apr, 2020
You need to use an If Conditions action, you check the radio value and run some code to store add a new subscriber to the mailing list!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
olizan74 24 Apr, 2020
Hello Max,
Hum, i don't understand. I have read this post : https://www.chronoengine.com/forums/posts/t103500/cf6-and-acymailing-subscription

It seems to be +- the same action as i want.

i have

1)
text field : field_text1
name : Nom
id :nom

2)
text field : field_text2
name : Email
id :email

3)
radio group field_radio23 :
Label : do you want receive my newsletter ?
name : inscription_newsletter
options : 1=yes, 2=no

4)
tab actions
event switcher 0 or 1
event 1 = CURL

general : https://demo.mamanpoule.be/index.php?option=com_acymailing&ctrl=sub&task=optin&hiddenlists=1&user[name]={data:field_text1}&user[email]={data:field_text2}

data provider : {data:inscription_newsletter}



----------------------------
Acymailing list = id 1
header: name, email

No error but no acymailing list registering
olizan74 24 Apr, 2020
mmm the problem seems to be the insertion of the datas in the link

data:field_text1 and data:field_text2

i have changed to the name of the text field : "nom" and "email"
https://demo.mamanpoule.be/index.php?option=com_acymailing&ctrl=sub&task=optin&hiddenlists=1&user[name]={data:nom}&user[email]={data:email}

no change. I have tested with simple message. it works. when i choose 1 the message is displayed and when i choose 0, an other message is displayed

when i place values in the url, this url works and i have the message "you receive a confirmation email to subscribe to our newsletter ..." and i receive the email.
olizan74 24 Apr, 2020
is the order of event is important ?

action order :

1
event switcher
1 : curl -> https://demo.mamanpoule.be/index.php?option=com_acymailing&ctrl=sub&task=optin&hiddenlists=1&user[name]={data:nom}&user[email]={data:email}
success : message
0 : message

2
message : order confirmation

3
email : recipients list ...

4
save data

5
read data

6
CSV
olizan74 24 Apr, 2020
Answer
ok i have resolved the problem by the "php method "
https://www.acyba.com/acymailing/107-acymailing-chronoform.html#curl
Max_admin 30 Apr, 2020
CURL should be the best option, but it looks like they have changed their website and the link is not working anymore now!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.