Support » Plugin: SimpleModal Contact Form (SMCF) » Integrate with iContact?

Viewing 1 replies (of 1 total)
  • 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='' style='display:none' name='icpsignup' id='icpsignup2xx1' accept-charset='UTF-8' onsubmit='return verifyRequired2xx1();'>
    			<input type='hidden' name='redirect' value=''>
    			<input type='hidden' name='errorredirect' value=''>
    			<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>
    		$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'>
    	<div class='smcf-bottom'> </div>
    	<script type='text/javascript'>
    	var icpForm2xx1 = document.getElementById('icpsignup2xx1');
    	if (document.location.protocol === 'https:')
    		icpForm2xx1.action = '';
    	function verifyRequired2xx1() {
    	  if (icpForm2xx1['smcf-email'].value == '') {
    		alert('The Email field is required.');
    		return false;
    	return true;
    		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.

Viewing 1 replies (of 1 total)
  • The topic ‘Integrate with iContact?’ is closed to new replies.