The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

CCSFG ERROR

Highlighted
Occasional Participant

CCSFG ERROR

Hi,


I downloaded the CCSFG and uploaded, verified credentials, set up form, copied/pasted the form html into my Wordpress page and it all looks fine enough but when I go to hit "join my mailing list" button I get a fatal error!


Fatal error: Class 'CC_Config' not found in /home/content/67/6413467/html/CCSFG_0.0.3/signup/index.php on line 3


I am confused. The config file is there but just doesn't seem to want to link properly or something...


 


Please advise how to make this work.


 


Thanks,


Blake

11 REPLIES 11
Highlighted
Employee

WordPress Join My Mailing List

Hello Blake,



I installed Wordpress on my PHP server and added the Constant Contact Signup Form Generator, and I was able to make a post with the signup form. Where are you putting the CCSFG_0.0.3 folder? I put it in the main Wordpress directory, and ran the setup, then pasted the HTML code into the HTML section for doing a WordPress post.



There is also a Constant Contact WordPress Widget that you might want to try using, that has been specifically made for WordPress.  Keep in mind that this widget is a 3rd party program, and we normally do not offer support for it.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Occasional Participant

Different problem

Hi Ben,


Thanks for the info on the widget. I think we may have application for that in the future. I WAS able to get everything to work....kind of... as far as getting the submit to work. I was using dreamweaver to upload the CCSFG_0.0.3 folder. I used Filezilla and changed the format to binary and it worked. I'm really happy this worked, however, I have another, more important problem. This speed bumb yesterday was only preventing me from trying to do what I really wanted to do. I love the way everything is looking and all the fields styled with my sites css. The thing is my client demands that we add another drop down menu exactly like the states or countries but with the names of charities the users can select. I got it to show up exactly the way we want it and you can select a charity and it all still submits. However, when you go into contact  info in our constant contact account the newly signed up names and all their information are showing up EXCEPT the field with the charity name I added. We need to be able to see which charity they selected. How can I get a dropdown menu that will show up in the contact report. This is key and the client will be unhappy until resolved.


Please Help again,


thank you!!


Blake

Highlighted
Employee

Hi Blake, It would be

Hi Blake,



It would be possible to do this by modifying the Constant Contact Signup form; however, this functionality was not built into it by default.



When you first go through the setup for the CCSFG, add a Custom Field, for example, Custom Field 1. Once you get the HTML code for the form, remove the Input tag that currently is CustomField1, and add a Select Tag:



<select type="text" name="CustomField1" value="" id="CustomField1">

<option value="volvo"<Volvo>/option>

<option value="saab"<Saab>/option>

<option value="fiat"<Fiat>/option>

<option value="audi"<Audi>/option>

</select>



This will add the drop down box, and will add the selection to Custom Field 1.



If you have any further questions please let me know.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Occasional Participant

One Last thing... I hope

AWESOME! I got it to work with that. I was so close but made a rookie mistake and I think I just forgot to put the select type ="text" or something easy because the drop down was showing up but just not transfering the data. THANKS for your help.


 


I have one last thing... I hope. In the CCSFG there is not an option (that I can find) to make select fields * Required. (I would like it to not let it submit and say "you forgot a field" or something.) What is the code or what do I need to make this happen? This is sort of important so people don't forget somehting on my form.  Also, If there is a way to make individual fields longer or shorter that would be great to know but not anything crucial.


 


Again, thanks so much for you help.


Blake

Highlighted
Employee

Re: Required fields in the CCSFG

Hi Blake,



At this time the ability to set fields as required in the Constant Contact Signup Form Generator is not something that was built into its functionality.  If you do have some knowledge of PHP, it would be possible to add this ability in the code.



If you have any questions regarding this please let me know.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Occasional Participant

Ben,   I do have the basic

Ben,


 


I do have the basic knowledge of PHP, enough to modify and change Wordpress templates to my needs. Would it be too troublesome to ask you to explain how to do make some fields mandatory?


 


Thanks again for your time,


 


Blake

Highlighted
Employee

Javascript to make the fields required

Hello,



The easiest way to make fields required is to actually modify your HTML file with the form, and add JavaScript that checks specific input fields by their name, and does not let the form submit unless they have content.



I have provided the code below that should do this for the EmailAddress field, but you can add others if you would like:



In the head tag of your HTML index file you would add this:



<head>


<script language="JavaScript" type="text/javascript">

<!--

function formValidation ( form )

{

if (form.EmailAddress.value == "")

{

alert( "You are missing a required field: Email" );

form.EmailAddress.focus();

return false ;

}

return true ;

}

//-->

</script>

</head>



Then in the form tag, you would add: onsubmit="return formValidation(this);"

which would make it probably look something like: <form id="ezsignup" name="ezsignup" method="post" action="/ccsfg_0.0.3/signup/index.php" onsubmit="return formValidation(this);">



Just note that the EmailAddress in form.EmailAddress has to be the name of the field you would like to be required.



If you have any further questions on this please let me know.



Regards,


 

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Member

Re: Javascript to make the fields required

Can you do this for multiple inout fields?

Highlighted
Honored Contributor

Re: Javascript to make the fields required

Hello,

 

In order to do this, the absolute simplest method is to add new if statements to the javascript for each additional field. You can format them like this:

 

if (form.FieldName.value == "")

 

Best Regards,

Elijah G.
API Support Engineer
Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured