I am trying to modify the php api sample code (file name simple_form.php)
However what I want is on my website to just have a form that collects the users first name, last name and email address. I want to use an api call because I need the info also added to a local mysql database for login to a vip section.
Anyway anytime I make all the fields hidden in the sample php file I get a error occured error message when testing the form submit.
It seems to be in relation to making the email lists list check boxes hidden.
I am attaching the file I am editing so you all can take a look and advise me
So any suggestions?
I think the issue you are having is the $postFields value that you are using. Currently, line 27 of your example is listed as:
However, this is required to be an array of list ID's. If you were just wanting the contacts to be automatically subscribed to list id 11, you would want to change this to:
I hope this helps. Please let us know if you have any other questions or concerns regarding this. Thanks.