• Resolved mslovak

    (@mslovak)


    I had to check “Enable alternate form action!” because I had to receive the form data on another page and make some changes to what was submitted. Ajax is enabled. Using version 14.14

    Now people who received admin email notifications are complaining that they are not receiving notifications since this change. Is this happening because I checked the box.

    Is there another way to get posted form data on another page without doing this? I couldn’t get it without this box being checked.

    Thanks
    Marc

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author bgermann

    (@bgermann)

    You can read the consequences in the note on alternative form action. No, you will not receive any emails with this enabled.

    A way to have cformsII processing and another data sink is using the cforms2_after_processing_action and program it yourself.

    Thread Starter mslovak

    (@mslovak)

    I responded to your first note by saying that I did read the note which didn’t say anything specific about email notification and implied that if Ajax was implemented that this wasn’t an issue

    If you enable an alternative form action you will loose any cforms application logic (spam security, field validation, DB tracking etc.) in non-ajax mode! This setting is really only for developers that require additional capabilities around forwarding of form data and will turn cforms into a front-end only, a “form builder” so to speak.

    I’m not sure what you mean by cforms2_after_processing_action. I changed my form to uncheck Alternate form action and checked the following

    Enable alternative success page (redirect)

    But that didn’t work because the form data wasn’t passed – at least in the same way it was under the other option. I need this feature since I have to add a 3% processing charge to an amount to be sent to Paypal.

    Where is the option about cforms2_after_processing_action and is form data passed in the ame way.

    Thanks

    Plugin Author bgermann

    (@bgermann)

    You can find cforms2_after_processing_action in lib_validate.php. It is a WordPress action. You can find information on using actions in your own PHP code in the official WordPress plugin documentation.

    You should check the data structure of the $trackf variable that is the action’s parameter. In your PHP code you would use that data to create an HTTP request to the site that you want the data to be sent to (PayPal?). If the HTTP request fails you should throw an exception that is then handled by cformsII.

    Plugin Author bgermann

    (@bgermann)

    And no, the note does not imply that if you use AJAX, this is a safe option to use. I will remove “in non-ajax mode” in the next version to clarify this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Enable alternate form action and admin emails’ is closed to new replies.