Has anyone modified the CCFSG script to update existing e-mail accounts?
I am using a form to have members from my soccer teams sign up. However, if the e-mail account already exists, I just get an error stating that the address is already in the system. This means that a member who has signed up for one team can't go back and sign up for a second team. I'm using individual lists for each team, so when someone signs up for a team they are actually subscribing to a list.
Not sure this makes sense. Basically I just want to use the CCFSG script to add accounts through a custom form, and update the mailing lists of accounts that already exist.
I would really appreciate any help. Thank you!
The Constant Contact Signup Form Generator (CCSFG) was designed to add contacts to the account, but does not contain the logic to update an existing subscriber. This is intentional.
We had considered implementing a check to see if the user exists, and if so to allow you to update them, but this poses a risk as there is no way to verify the person typing in the email address is indeed that person. This would allow PERSON A to go to the website, and update PERSON B's information, as long as they know their email address.
If you are looking to place this logic into the CCSFG, you would want to insert the logic to search for the contact using the format:
If you take a look at the PHP sample packs, the file cc_class.php has a function called 'subscriberExists()' that you could use which will let you know if the contact exists or not.
I hope that this information helps and I apologize for any inconvenience that this issue has caused. If you have any other questions please let us know. Thank You.
That does make sense. I was actually able to figure out how to do it, but can't seem to get it to add the information for additional lists. I was trying to use a dropdown, but think I may need to switch to check boxes.
What I am doing is using the system to track my individual teams. Its then tied in to paypal so that members can pay automatically. The problem is, someone with multiple children who needs to signup and pay for multiple teams, is continuously removed from one team when they submit the signup form for the second kid.
I need to figure out how to read the list the person is already registered for, and add them to a second list. Then we handle all removals on the backend from individual lists, or the member can do all from the unsubscribe page.
Do you know how i might be able to use a hidden variable to pass the existing list value with the form again?
Thank you for your help.
It sounds like you are updating the contact and not including their previous list selections in the XML you are using to update them. When your contact clicks 'submit' on the page to update their contact information, it is assigning them to whatever list they have selected on that page, and that page only.
Often times, when an integration is going to be updating a users information, they will first perform an http get to retrieve that contacts information. Then they will populate the form with that information, including a series of checkboxes that are pre-checked for lists that a user is already subscribed to. When the form is submitted, this will update that contact’s information with the new list selections, which will include all the lists that they were previously signed up for, unless they removed them on this update page.
I would recommend taking a look at our Sample Codes page, as all of our samples use this method for updating contacts.
I hope that this helps. Please let me know if you have any further questions regarding this.