Hello,
I have an API that inscribes the email adress of the visitor on an external mailinglist, and I would like to include this in my form, but the adress should only be sended if the visitor checkes a certain checkbox. Can someone help me with this problem? I need to know where to include the API and how to make the checkbox work... Thank you in advance,
Tiko
Ok, I really have to get myself some php knowledge... I won't get any further without... Aparently the things I want are to complicated to get easy answers🙂 . Thank you anyway.
Hi Tiko,
There is some PHP required but it's fairly simple. If you have a colleague or friend with some coding experience then they should be able to help you.
Unfortunately it's not possible to build-in every possible form application.
Bob
yes, of course, I understand. What I understood is that I should include an event switcher, configure it for the checkbox, and grag a custom code with the api into one of the events of the switcher... Is this right?
Thank you for your patience.
tiko
Hi Tiko,
Yes, that's correct.
Or you could do it all with PHP. What is the API that you want to connect to? Is there some basic documentation that I could look at?
Bob
ok, I'll send you the api in PM because of some personal info included in the api. Thank you for your interest.
Wow thank you for that! I tried to include it, but it just doesn't seem to work. What I did: I copied your PHP in a custom code action. I replaced the "id" with my id, I replaced "some_path/php-mailjet.class-mailjet-0.1.php" with the path to the file on my server, and I named the checkbox "check_box" and wrote "yes=" in the optionbox... So tell me, how many things do I do wrong?🙂 Everything???
Hi Tiko,
The obvious thing to debug to see if the Checkbox 'filter' is failing - 'yes' isn't the same as 'Yes' here so it may be. If you comment out the // return; line temporarily that will remove the filter and you can see if the rest work.
Bob
ok, I tried without the filter and that doesn't work. The only thing I see that could be wrong is the path to the php-mailjet.class-mailjet-0.1.php file. How should the line look if it's placed here: http://reve2.com/MyJoomla/mailjet/php-mailjet.class-mailjet-0.1.php .
Thank you for your patience.
Tiko
Hello,
sorry for insisting, but does someone have any idea what could be wrong with what I'm trying?
Thank you in advance,
Tiko
I still don't have a solution for this problem. Any help is welcome.