Hi,
I have a multi checkbox field that contains only one option. I use it to let users subscribe to acymailing newsletter, that option is the newsletter list ID. In my case I have just one list, so that field just show one option but it must be a multi checkbox because in that way I can let it work with the acymailing subscribe process (don't remember why, but should be a post on the forum somewhere that explains how to)
If users choose that option (subscribe to the newsletter) I need to show/hide another field (a radio button).
I've setted the radio button as "parent hidden", then I've setted the multi check box field with 2 events:
1) if = 1 (where 1 is the value of the first and only option) => showparent (radio field)
2) if != 1 => hideparent (radio field)
In this case when I check the option then the radio button is displayed but when I uncheck the option the radio button is not hidden
What's wrong? How should I do it?
Thanks in advance.
I have a multi checkbox field that contains only one option. I use it to let users subscribe to acymailing newsletter, that option is the newsletter list ID. In my case I have just one list, so that field just show one option but it must be a multi checkbox because in that way I can let it work with the acymailing subscribe process (don't remember why, but should be a post on the forum somewhere that explains how to)
If users choose that option (subscribe to the newsletter) I need to show/hide another field (a radio button).
I've setted the radio button as "parent hidden", then I've setted the multi check box field with 2 events:
1) if = 1 (where 1 is the value of the first and only option) => showparent (radio field)
2) if != 1 => hideparent (radio field)
In this case when I check the option then the radio button is displayed but when I uncheck the option the radio button is not hidden
What's wrong? How should I do it?
Thanks in advance.
Hi deltafidesign,
The built in events don't work well with CheckBox groups - It can't work out what is checked and what isn't. You can use a radio button for this or write custom code to handle it.
Bob
The built in events don't work well with CheckBox groups - It can't work out what is checked and what isn't. You can use a radio button for this or write custom code to handle it.
Bob
Hi Bob,
thanks for reply. Could you suggest me the code I should use? I cannot use a radio button.
Thanks in advance.
thanks for reply. Could you suggest me the code I should use? I cannot use a radio button.
Thanks in advance.
Hi deltafidesign,
You can use a radio button - or a single checkbox and use a Custom Code action after the form submits to convert the data into the format you need for AcyMailing.
Bob
You can use a radio button - or a single checkbox and use a Custom Code action after the form submits to convert the data into the format you need for AcyMailing.
Bob
Hi bob,
I'm a bit confused. I don't really know what to do and what code should I write (I'm not able also to write such code... :-) )
Would you help me step by step also providing the code?
I'm a bit confused. I don't really know what to do and what code should I write (I'm not able also to write such code... :-) )
Would you help me step by step also providing the code?
HI deltafidesing,
I'd use a single checkbox with the name say 'sign_up' with the Field value yes and Ghost value no
In the On Submit event add an Event Switcher action with one event yes; add the cURL or ACY Subscribe [GH] action to the yes event of the Event Switcher. In the Event Switcher add the code:
Bob
I'd use a single checkbox with the name say 'sign_up' with the Field value yes and Ghost value no
In the On Submit event add an Event Switcher action with one event yes; add the cURL or ACY Subscribe [GH] action to the yes event of the Event Switcher. In the Event Switcher add the code:
<?php
return $form->data['sign_up'];
?>
Bob
Hi Bob, thanks for reply but I would keep the multi check box field. I would let the user the ability to choose one or more acymailing list at the same time even if at the moment I use only one list.
Any other solution? Javascript?
Any other solution? Javascript?
This topic is locked and no more replies can be posted.