You don’t need to place this script inside jQuery. You can add it as a script directly to the page where your form is located.
Here’s an example of adding placeholders:
window.ameliaActions = { InitInfoStep: function (success = null, error = null, data) { // Triggered once the info step is shown console.log('InitInfoStep HOOK');
// adjust "2" with the ID of your customfild // Example placeholders modification: // data.customFieldsPlaceholders.value[2].placeholder = 'Test'; } };
For default fields (e.g name, lastname, email, phone) you can edit in customize secion.
Great, you can translate this string with the LocoTranslate plugin. Simply select a language, search for a string and then translate it to according to your needs.
I add the "InitiateCheckout" function but something is wrong because the first "InitInfoStep" function doesn't work anymore. Is not possibile to use two amelia function in the same script?
That's one workaround, but usually, we recommend installing the translation plugin since it's much easier to manage the translations.
For the other question, i would kindly ask you to open a new ticket since it's a different topic. Our procedure is to have separate tickets for each topic.
Hi,
I would like to add a js event when Amelia load the customer form. I try to use this script:
jQuery(document).ready(function($) { // my script });
Is not possibile because you load the html by js so I see your document and I find many js event trigger. I try to use this:
jQuery(document).ready(function() { window.ameliaActions = { InitInfoStep: function (success = null, error = null, data) { console.log('InitInfoStep HOOK') console.log(data) console.log('my script'); } };
I wrong something... what?
Another question: is possibile to add the placehoder to the input fields "Name" and "Lastname"?
Can you help me?
Thank you!!!
Hello Mauro,
I hope you are doing well.
You don’t need to place this script inside jQuery. You can add it as a script directly to the page where your form is located.
Here’s an example of adding placeholders:
window.ameliaActions = {
InitInfoStep: function (success = null, error = null, data) {
// Triggered once the info step is shown
console.log('InitInfoStep HOOK');
Object.keys(data.booking.customFields).forEach(cf => {
console.log('Custom field ID: ', cf);
console.log(data.booking.customFields[cf]);
console.log('------------');
});
// adjust "2" with the ID of your customfild
// Example placeholders modification:
// data.customFieldsPlaceholders.value[2].placeholder = 'Test';
}
};
For default fields (e.g name, lastname, email, phone) you can edit in customize secion.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
Hello Stefan,
thanks for your support and sorry for my late reply.
I'm using your snippet but I'm probably doing something wrong.
This is the script I'm using:
I try:
I can't see the placehoder "Test" and all the console log on the browser.
What am I doing wrong?
Hi Mauro,
Apologies for the delayed answer. If you are referring to this website
https://gorrinogomme.com/prenotazioni-cambio-gomme/
unfortunately, it will not work since you are using "old" shortcode on this page
this snippet works only for redesign forms (new booking form v2).
You can test it out with the new booking form and let me know if it works.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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 Steven,
I'm referring to other website:
croceblu.it
The page of the booking system is not published and here we use the booking form v1.
I'll try v2 and update my reply.
Hi Mauro,
Got it, i thought that you were referring to the site I've linked.
Please, keep me posted.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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 Stefan,
I solved using new booking form v2. Thank you!!
I've a question about the new form: if I want to rename the Stripe button to "Cards", I need to use your function but... what? Can you help me?
Hi Mauro,
Great, you can translate this string with the LocoTranslate plugin. Simply select a language, search for a string and then translate it to according to your needs.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
I'm using js to translate the words. I use this and works for me:
Last question. I've this code:
I add the "InitiateCheckout" function but something is wrong because the first "InitInfoStep" function doesn't work anymore. Is not possibile to use two amelia function in the same script?
Hi Mauro,
That's one workaround, but usually, we recommend installing the translation plugin since it's much easier to manage the translations.
For the other question, i would kindly ask you to open a new ticket since it's a different topic. Our procedure is to have separate tickets for each topic.
Thank you for your understanding.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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 Stefan,
sorry! I don't open a new ticket because I solved the problem: there was a stupid error (";" rather than ",").
The new booking form v2 and the js trigger give us many possibility to customize the form!
Thank you for your support and patience!
Hi Mauro,
No problem, glad to see that you were able to find the solution.
Of course, let us know if you have any other questions or issues.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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