Sorry about that... Juggling too many projects and suffering from CRS... Hopefully I'll have this resolved tomorrow!
Not sure if this is the right area to ask a question Ryan as I am new here, but I was wondering if theres a way to validate the fields in a form using Ajax / js. I'm not a programming so I'm a little stuff. Your help is greatly appreciated Ryan. Thanks!
I tried using the generated code and it works but also gives these error messages at the top of the "success" page. These code segments have to do with generating an array of my CC lists but I don't know how to correct it. Thanks for any help. -Beth
Warning: Invalid argument supplied for foreach() in /home/peoplefi/public_html/temp/CCSFG_0.0.6/cc_class.php on line 137
Warning: Invalid argument supplied for foreach() in /home/peoplefi/public_html/temp/CCSFG_0.0.6/cc_class.php on line 149
The lines indicated in those warnings are for foreach loops used to get the contact list page links, which can be used to request additional pages (pages of up to 50 are returned with each API request), and the ID and title of each contact list.
This function is called from the index.php file in the signup folder of your CCSFG installation after the form is submitted.
The only argument passed into these foreach loops are objects from the simpleXML object that is created within the same getLists() function when the XML response that contains the data for your lists is parsed (at line 134 in the cc_class.php library).
It may be helpful to learn what is being passed into these foreach loops, by adding some code between lines 135 and 137 to echo the contents of the object to your browser. For example,
echo '<pre>'; print_r($parsedReturn); echo '</pre>';
If the API request was not successful, this may dump any errors that are being returned, and help determine what's causing the issue.
View API documentation, code samples, get your API key.