PFG migration to EasyForm

Hi, we are migrating clients from PFG to EasyForm. A common use of PFG for us is to facilitate taking donations by recording user details and handling the interaction with a payment gateway. We used fg_thankspage_embedded_view templates to override the thank you page to initiate the payment and a browserview to handle the callback. Looking in the EasyForm repo I don't see how to override the thank you view Any ideas?

There are scripts @@migrate-ploneformgen. I never used it. Code is here collective.easyform/src/collective/easyform/migration at master · collective/collective.easyform · GitHub

Maybe someone else knows details.

The migration scripts worked pretty well for us but I think Mike is asking for advice on how to implement the equivalent in EasyForm

did you try with jbot?

I'd implement this with a custom Action like for example the SaveData action here collective.easyform/ at master · collective/collective.easyform · GitHub ... those actions are fired after filling out the form and before showing the thankspage ...

Thanks for the replies. @jensens I will try the migration.

@yurj PFG allowed the customisation to happen in the site (even per form) not on the file system.

@petschki I tried using Custom Success Action to redirect to a custom page without success. I'll try using a custom script but not sure how to redirect to the payment gateway and getting back to the next action.

No, you can't but you've a " Custom Success Action " in overrides, selecting "traverse_to" from the dropdown, otherwise you'll loose the form variables and the context. If you traverse to a custom browserview, you can do your staff and then call the thank_you browser view with the REQUEST as parameter.

Thanks @yurj, the custom success action works! I can get to my browserview method which get me to the gateway with all my variables intact. However, I'm struggling with a second use case where I need to traverse to an intermediate template (with more options) and then on to the gateway. I can get all the way to the gateway but the intermediate template is weird in that it doesn't have an outer-wrapper so my styling is messed up. I can reproduce this when traversing to a normal page. However when I change the Action Type to redirect_to, the page has an outer-wrapper.

I think this is a bug so I created an issue here

Plone Foundation Code of Conduct