Constant Contact Signup Form Generator (CCSFG)

Highlighted
Occasional Participant

Re: Constant Contact Signup Form Generator (CCSFG)

Sorry about that... Juggling too many projects and suffering from CRS... Hopefully I'll have this resolved tomorrow!

Highlighted
CTCT Employee

Re: Constant Contact Signup Form Generator (CCSFG)

No problem Pete, let me know if you need anymore help.

Ryan Davis
Quality Engineer

Re: Constant Contact Signup Form Generator (CCSFG)

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!

Highlighted
Moderator

Re: Constant Contact Signup Form Generator (CCSFG)

The form which we provide as the result of using the CCSFG is a standard HTML form.  As such, you can add any JavaScript you'd like to the form for any pre-submission validation.  It would be added the same way you'd add to any form on any other HTML page.

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Regular Visitor

Re: Constant Contact Signup Form Generator (CCSFG)

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

 


Highlighted
Trusted Contributor

Re: Constant Contact Signup Form Generator (CCSFG)

Hello,

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,

var_dump($parsedReturn);

or

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.

 

Cheers,

Mark Coleman
Support Engineer
Developer Portal

View API documentation, code samples, get your API key.