Integrate with iContact?
-
Hi Eric,
How much of the form markup can i change in smcf.php to get the form to feed data to my iContact account?
iContact forms have several hidden inputs to verify the account, as well as a script, and when I put all this into the form in smcf.php it seems to interfere with smcf’s own functions.
Or… should I be editing smcf-data.php?
http://wordpress.org/extend/plugins/simplemodal-contact-form-smcf/
-
Eric,
Just an update: I’ve tried some modifications for function footer() in smcf.php –
Here’s what I did.// create the contact form HTML $output .= "<div id='smcf-content' style='display:none'> <div class='smcf-top'></div> <div class='smcf-content'> <h1 class='smcf-title'>" . $title . "</h1> <div class='smcf-loading' style='display:none'></div> <div class='smcf-message' style='display:none'></div> <form method='post' action='https://app.icontact.com/icp/signup.php' style='display:none' name='icpsignup' id='icpsignup2xx1' accept-charset='UTF-8' onsubmit='return verifyRequired2xx1();'> <input type='hidden' name='redirect' value='http://www.my-url.com/thanks-for-signing-up.html'> <input type='hidden' name='errorredirect' value='http://www.my-url.com/signup-error.html'> <label for='smcf-email'>" . __("Email", "smcf") . ":</label> <input type='text' id='smcf-email' class='smcf-input' name='email' value='' tabindex='1002' />"; if (get_option("smcf_form_cc_sender") == 1) { $output .= "<label> </label> <input type='checkbox' id='smcf-cc' name='cc' value='1' tabindex='1005' /> <span class='smcf-cc'>" . __("Send me a copy", "smcf") . "</span> <br/>"; } $output .= "<label> </label> <button type='submit' class='smcf-button smcf-send' tabindex='1006'>" . __("Send", "smcf") . "</button> <button type='submit' class='smcf-button smcf-cancel simplemodal-close' tabindex='1007'>" . __("Cancel", "smcf") . "</button> <input type='hidden' name='token' value='" . $this->token() . "'/> <input type='hidden' name='listid' value='2xx16'> <input type='hidden' name='specialid:2xx16' value='SxxM'> <input type='hidden' name='clientid' value='15xx13'> <input type='hidden' name='formid' value='2xx1'> <input type='hidden' name='reallistid' value='1'> <input type='hidden' name='doubleopt' value='0'> <br/> </form> </div> <div class='smcf-bottom'> </div> <script type='text/javascript'> var icpForm2xx1 = document.getElementById('icpsignup2xx1'); if (document.location.protocol === 'https:') icpForm2xx1.action = 'https://app.icontact.com/icp/signup.php'; function verifyRequired2xx1() { if (icpForm2xx1['smcf-email'].value == '') { icpForm2xx1['smcf-email'].focus(); alert('The Email field is required.'); return false; } return true; } </script> </div>"; echo $output; }
What I think is going on is smcf-data.php (or smcf.js) is still trying to send an email upon
submit
, or at least looking for confirmation that php mail has sent that email, rather than giving iContact the data. I can’t imagine how to have smcf check the status of that form submission to iContact, actually- that’s over my head maybe.Anyway, what I’d ideally like to make happen is for SMCF to validate the email and handle the success/fail dialog with iContact, rather than the redirect/errorredirect method used by the “manual” iContact form.
If this falls under the category of custom development… let me know.
- The topic ‘Integrate with iContact?’ is closed to new replies.