Support » Plugin: Fast Secure Contact Form » Dynamic “To” address on same page (multiple reCAPTCHA)

  • Resolved schnoodle

    (@schnoodle)


    Hi there, I’ve got the FS reCAPTCHA plugin in addition to FSCF, and I love them both. I have switched our company to mostly using this for clients, as it seems to prevent spam a lot better than others, such as Contact Form 7.

    Anyways, the page at hand will be one that the client can add more employees to dynamically, each with their own email. Now, for security reasons, instead of displaying the email, the user will just click “email Joe,” where a modal will pop up that extracts that employee’s email, using php with the shortcode of

    [si-contact-form form=1 email_to=\"".$emp["email"]."\"]

    However, doing this also creates multiple Contact Forms on the page, that use the same IDs, due to the way FSCF is set up. I’m somewhat new to the field, so it’s possible that I’ve not thought of a more reasonable solution, but is there some way that I can adjust, at least, each of the fscf_recaptcha(form-id) to add, say, _(number) at the end?

    Or is there a better way to call the information for an employee dynamically on the same page?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, the plugin developer will investigate further your current issue.

    Thank you

    Thread Starter schnoodle

    (@schnoodle)

    If someone manages to use this plugin still, and needs this topic – I fixed this with AJAX, by creating a separate, blank page that holds a blank form, using the ajax to pass the email into the form. I had to store the name and email in data- attributes in the html.

    script:

    
    $(".modal-trigger").on("click", function(){
    		var value = $(this).attr('data-email');
    		var name = $(this).attr('data-name');
    		$.ajax({ url: '/contact-form.php',
    		 data: {email: value},
    		 type: 'post',
    		 success: function(output) {
    				$("#contact-name").text("email " + name);
    				$("#contact-form").html(output);
    			}
    		});
    	});
    

    and the contact.php itself just used

    echo do_shortcode("[si-contact-form form=1 email_to='".$_POST['email']."']");

    • This reply was modified 4 years, 7 months ago by schnoodle.

    @schnoodle, unfortunately this plugin is no longer supported. I recommend finding an alternative as soon as possible.

    Kind regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Dynamic “To” address on same page (multiple reCAPTCHA)’ is closed to new replies.