I recently noticed that a new feature was implemented: "a mechanism that allows custom validation checks before service booking." However, I couldn’t find any detailed explanation or settings related to this feature in the Amelia dashboard.
Could you please provide more information on how this feature works and how we can configure it? Is it available directly in the UI, or does it require custom coding?
I would appreciate your guidance on how to enable and use this feature effectively.
This is a hook that is available now. The hook ‘customValidation’ is triggered when the customer information step is validated, before the payment step loads
window.ameliaActions = {
customValidation: function (success = null, error = null, data) {
console.log('customValidation HOOK')
console.log('------------')
console.log(data)
const customValidator = (rule, value, callback) => {
if (value.includes('SOME_REGEX')) {
callback(new Error())
} else {
callback()
}
}
// this example is for email input field
data.rules.email.push({message: 'CUSTOM MESSAGE', validator: customValidator})
// this example is for a custom field
var customFieldId = 2
data.rules['cf' + customFieldId].push({message: 'CUSTOM MESSAGE', validator: customValidator})
}
}
Dear Amelia Support Team,
I recently noticed that a new feature was implemented: "a mechanism that allows custom validation checks before service booking." However, I couldn’t find any detailed explanation or settings related to this feature in the Amelia dashboard.
Could you please provide more information on how this feature works and how we can configure it? Is it available directly in the UI, or does it require custom coding?
I would appreciate your guidance on how to enable and use this feature effectively.
Best regards,
Hello there,
Thank you for reaching out to us.
This is a hook that is available now. The hook ‘customValidation’ is triggered when the customer information step is validated, before the payment step loads
You can find this also on this link https://wpamelia.com/js-hooks-booking/-
Should you have any further inquiries, we kindly request that you open separate tickets for each question and we will gladly help you there.
We wish you all the best and hope you have a wonderful day ahead.
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, 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