Jump to content

A couple of questions about the ProcessWire Form Builder


Neo
 Share

Recommended Posts

I am currently considering the ProcessWire Form Builder for a project that requires a front-end form, which visitors can use to post new content to the site. Every form post should be saved as an unpublished page that can be reviewed by the admin, who can then later publish the page. Once the form has been submitted, an email-notification should also be sent to the admin. Ideally, the front-end form can only be submitted after a fixed payment has been made, ideally via MercadoPago API, which is very popular in Latin America.

Unfortunately, you cannot test the module before purchase, so that's why I have a couple of questions:

- Can form posts be saved to unpublished pages and an email-notification be sent at the same time?

- Can payments be integrated into the form?

I have built a course directory with ProcessWire once with a similiar specification (without payment), but coded the form manually and used the PW API to create the unpublished pages, which was Ok.

If there is not too much customization required, I thought it might be a bit more convenient to use this module and facilitate back-end handling.

Would appreciate your advice.

Link to comment
Share on other sites

Good Day.  I can only speak for my experiences and I am not a talented coder, like many others on this forum.

- Can form posts be saved to unpublished pages and an email-notification be sent at the same time?

Yes, this is one of the many great and helpful features of Form Builder

- Can payments be integrated into the form?

That I am not completely sure, however I believe it's possible.  Someone with more experience will have to chime in.

Unfortunately, you cannot test the module before purchase, so that's why I have a couple of questions:

Form Builder is a module that saves you time, when it comes to doing forms. It's a well thought out form solution. Ryan has a solid money back guarantee on this product, so you shouldn't be wary about making a purchase.  You also gain access to the Form Builder VIP Forum, where you will have access to a treasure trove of information about Form Builder and different implementations.

If there is not too much customization required, I thought it might be a bit more convenient to use this module and facilitate back-end handling.

The customization features of Form Builder are there to help you implement the solution you desire.  It's very convenient and I believe a solid time saver.  Good luck in making your choice.

  • Like 4
Link to comment
Share on other sites

Thanks for your detailed answer, cstevensjr.

Would be great to know if someone has implemented payments via the Form Builder; 

i.e. the form only submits after successful payment.

Link to comment
Share on other sites

@kongondo In the mentioned post it looks like they added PayPal manually to a custom form and did not use the Form Builder.

So the question would be how to hook into the Form Builder events, i.e. just before form submission.

Unfortunately, PayPal does not operate in many countries in Latin America.

The example PHP code to process payments via the MercadoPago API looks like this:

<?php
require_once ('mercadopago.php');

$mp = new MP('CLIENT_ID', 'CLIENT_SECRET');

$preference_data = array(
    "items" => array(
        array(
            "title" => "Multicolor kite",
            "quantity" => 1,
            "currency_id" => "ARS", // Available currencies at: https://api.mercadopago.com/currencies
            "unit_price" => 10.00
        )
    )
);

$preference = $mp->create_preference($preference_data);
?>

<!DOCTYPE html>
<html>
    <head>
        <title>Pay</title>
    </head>
    <body>
        <a href="<?php echo $preference['response']['init_point']; ?>">Pay</a>
    </body>
</html>
Link to comment
Share on other sites

@Neo, I might be misunderstanding the flow of events but if you don't want people who haven't paid to submit the form you only render the form after payment. This wouldn't require any special Form Builder feature, just normal template logic. So it would go like this:

  1. User submits payment to MercadoPago from a payment page on your website.
  2. You check the response from MercadoPago to see if payment is successful. There must be some method in the MercadoPago API for this.
  3. If the payment was successful you render the form, maybe populating a hidden field from a get variable if you want to match the form submission to a payment.
  4. User submits the form for moderation.
  • Like 1
Link to comment
Share on other sites

I'd suggest Robin's step 3 no matter if you need to match form submissions to payments or not. People might try to fake the form requests (if the CSRF token doesn't already do so) and with that hidden field you can always check things in hindsight should really something go wrong.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...