I'm editing a signup form in Ruby on Rails so that contacts are added to a specific list. They're being added to the new list, however, they're also being added to my larger, main list (list ID 1) even though I'm only identifying the new list like so:
<%= hidden_field_tag 'list', '1305681793' %>
Is this a CC setting that's adding contacts to a default list in addition to the specified one?
If you're using the option that we have available to customize and extend our built-in signup forms, then it's important to note that those signup forms have a pre-configured set of one or more lists that are chosen through the UI. The option to specify lists on the form allows you to extend the set of lists, but does not replace the existing choice.
The easiest solution to this is to create a new signup form through the UI https://knowledgebase.constantcontact.com/articles/KnowledgeBase/18265-Create-a-Sign-Up-Form-with-th.... If you are already using our API, there is also an option to create forms programatically: http://developer.constantcontact.com/docs/signup-forms-tools/signup-form-creation.html
If you have any questions, please let me know!
Hi, thanks. We aren't using the pre-built forms--we created a custom form with the API. Here's the code below that we're using for the form. Neither I nor our developer can figure out why the contacts are being added to list 1.
<%= form_tag '/landing', method: :post, name: "Archive", target: "_top", id: "Archive" do %> <%= hidden_field_tag 'shortcut_id', params[:id] %> <%= hidden_field_tag 'signup_type', 'download' %> <%= hidden_field_tag 'entrypage' %> <%= hidden_field_tag 'entrydate' %> <%= hidden_field_tag 'numberofvisits' %> <%= hidden_field_tag 'referrerpage' %> <%= hidden_field_tag 'list', '1305681793' %> <%= text_field_tag 'firstName', "First Name", id: 'firstName' %> <%= text_field_tag 'lastName', "Last Name", id: 'lastName' %> <%= text_field_tag 'email', "Email", id: 'email' %> <%= invisible_captcha 'comments' %> <button type="submit">Submit</button> <% end %>
If you're using the API, then it's highly likely that something in the code which assembles the contact data before it is sent to Constant Contact with the API is assigning the extra list. Is your form code built from scratch or did you add on to one of the existing sample forms that are available? If your code is built on top of an existing tool, then I may be able to give some direction on where to look.
One thing that's very important to note in a case like this is that the API will never place a contact on a list unless you explicitly include that list in your API call. Since these contacts are appearing on two lists, that indicates that somewhere in the code that second list is being added.
View API documentation, code samples, get your API key.Visit Page