Neo Posted May 17, 2016 Share Posted May 17, 2016 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 More sharing options...
cstevensjr Posted May 17, 2016 Share Posted May 17, 2016 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. 4 Link to comment Share on other sites More sharing options...
Neo Posted May 17, 2016 Author Share Posted May 17, 2016 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 More sharing options...
kongondo Posted May 17, 2016 Share Posted May 17, 2016 No idea but just throwing this out there...there's a free PaymentPaypal module...by Antti... Also there this thread: https://processwire.com/talk/topic/7373-paypal-integration-to-form-builder/ Link to comment Share on other sites More sharing options...
Neo Posted May 17, 2016 Author Share Posted May 17, 2016 @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 More sharing options...
Robin S Posted May 18, 2016 Share Posted May 18, 2016 @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: User submits payment to MercadoPago from a payment page on your website. You check the response from MercadoPago to see if payment is successful. There must be some method in the MercadoPago API for this. 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. User submits the form for moderation. 1 Link to comment Share on other sites More sharing options...
LostKobrakai Posted May 19, 2016 Share Posted May 19, 2016 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. 2 Link to comment Share on other sites More sharing options...
Neo Posted May 19, 2016 Author Share Posted May 19, 2016 @RobinS @LostKobrakai Haven't thought about that possibility, which makes perfectly sense and would be easier to implement. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now