Forums

Chronoform to phplist with curl with condition

jgarvas 03 Mar, 2011
I am trying to use v3.2 with an existing form to add CURL support to signup to a phplist page, but every time I submit the page the debug CURL response is phplist re-displaying the submission form as if something was done wrong or is incomplete. I've put http://www.website.com/?p=subscribe&id=1 into the curl target URL

I tell it to pass email=email - but there are a number of fields the phplist form expects that I am not collecting in my form, but instead will simply statically populate. For instance, these are the form fields from the phplist submission form:

<form method=post name="subscribeform">
<td class="attributeinput"><input type=text name=email value="" size="40">
<span class="attributeinput"><input type=radio name="htmlemail" value="1" checked /></span>
<select name="attribute1" class="attributeinput"></select></td></tr>
<input type="hidden" name="list[1]" value="signup">
<input type="hidden" name="listname[1]" value="List Name Here"/>
<input type=submit name="subscribe" value="Subscribe">



The select group is a range of 1-90 and always submitting it with '90' will work. However, how do I define these values in the before CURL area so that they're passed along in the curl POST? htmlemail will always be 1...

Also - is it possible to make CURL a conditional act based on a yes/no radio button in the chronoform ? For instance, "Do you want to be added to our newsletter?" A yes would run curl, a no would skip curl.
GreyHead 03 Mar, 2011
Hi jgarvas,

The bottom box "Extra fields data" in the cURL plug-in configuration is the place for static data.

I would set the Target URL to http://www.website.com/ then put the following in the Extra fields data box:
p=subscribe
id=1
list[1]=signup
listname[1]=List Name Here

There may be a problem that the published vesion of cURL doesn't work correctly with array values :-(

There is also no way of stopping the current plug-ins family so it's not straightforward to do a conditional cURL without adding the cURL code manually.

Bob
This topic is locked and no more replies can be posted.