I'm not sure if this can be done with Amelia. I have reached out to our developers about this, and if there's a way I'll let you know as soon as they respond.
To clarify I need to grab the name, email and amount after the booking finish screen. The client is redirected to the payment URL and it is on that page that I need to prefill the form with their data. It seems like basic functionality that would normally be achieved with code like:
Our developers needed to know at which moment is it taken to the payment form, but I believe this answer you provided is enough.
As I'm not a developer I can't tell you how to approach this, and if it can be done, bu the ticket has been forwarded to our development team, so as soon as I receive a response from them, I will let you know.
I wasn't able to use those JS hooks because the window object did not contain those properties.
I made a workaround instead.
I added a hidden form with named hidden input fields and populated their values with the booking form input values.
This way I could append the hidden form fields to the url and fetch them via php $_GET method and prefill the payment form on the payment page. It's a tad hacky but does the job.
If it is possible to explain how to use those JS hooks properly I would be happy to hear.
I'm glad to hear that you were able to resolve this.
The JS hooks can be used in a lot of ways, and I cannot tell you exactly how they should be used for this use-case. People mostly use them to trigger some custom JS code.
Hi,
How do I prefill a form with booking data?
Example: Customer fills out booking form then gets sent to payment form. How do I prefill the payment form with customer name, email, and amount due?
I have looked at using webhooks but there is no documentation on how to grab the data to prefill other forms.
All I have managed to find so far is this:
If you could please advise on how to get the data after booking is completed.
Thanks.
Hello Maksem
Thank you for your purchase.
I'm not sure if this can be done with Amelia. I have reached out to our developers about this, and if there's a way I'll let you know as soon as they respond.
Thank you for your patience.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thanks Aleksandar.
To clarify I need to grab the name, email and amount after the booking finish screen. The client is redirected to the payment URL and it is on that page that I need to prefill the form with their data. It seems like basic functionality that would normally be achieved with code like:
Thank you Maksem.
Our developers needed to know at which moment is it taken to the payment form, but I believe this answer you provided is enough.
As I'm not a developer I can't tell you how to approach this, and if it can be done, bu the ticket has been forwarded to our development team, so as soon as I receive a response from them, I will let you know.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi again Maksem
You can try using one of the JS hooks that are triggered depending on the view:
When the booking is completed, you should be able to find the "amount". It should be in {booking: payments: {}}
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thanks Aleksandar.
I wasn't able to use those JS hooks because the window object did not contain those properties.
I made a workaround instead.
I added a hidden form with named hidden input fields and populated their values with the booking form input values.
This way I could append the hidden form fields to the url and fetch them via php $_GET method and prefill the payment form on the payment page. It's a tad hacky but does the job.
If it is possible to explain how to use those JS hooks properly I would be happy to hear.
Thanks for your help.
Hi again Maksem
I'm glad to hear that you were able to resolve this.
The JS hooks can be used in a lot of ways, and I cannot tell you exactly how they should be used for this use-case. People mostly use them to trigger some custom JS code.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables