Plugin Author
Malcolm
(@malcolm-oph)
Thank you Eric for your feedback … always useful.
1. Yes there is a script which was intended to handle validation for both the Reservations User Form, and the equivalent for payment gateways that do not supply user information themselves, but this was only being called for the latter. This has been fixed in v5.7.1.
There are limitations in validating EMail addresses, and the only sure way of doing so is by soliciting a response from the user. For this reason my preferred approach is to require users to register (using the standard WP registration process) before they can Reserve tickets. This can be achieved by setting the Reservations mode in the StageShow settings to User Profile.
2. I have not been able to reproduce this behaviour … can you please give me a URL where I can see it for myself? If you do not wish to publish it, please send it via my contact page.
Thanks
Malcolm
Thread Starter
eric3d
(@eric3d)
Thanks for the prompt response and fixes.
We are currently using WP registration for users to reserve, but found many users found the process confusing, which is why I prefer the inline form interface.
Requiring an email to be entered twice and implementing a very simple regex check (/\S+@\S+\.\S+/) could reduce the chance of email typos. It won’t confirm if an address is valid but will eliminate obvious errors.
I was hiding the country field because all our reservations are local. It would be nice to specify which fields are required.
I sent you a link for #2. I have the “Move Box Office below Active Trolley” option on, which may affect the behavior. Similarly, when I confirm the reservation, the message appears off screen.
Plugin Author
Malcolm
(@malcolm-oph)
The scrolling of the Reservations for is now fixed in v5.7.2
The extra validation, and the option to remove specified fields is still work in progress, but you can now add your own custom Javascript to the form.
The ‘stageshowCustom_OnLoadSubmitDetailsForm’ function will run when the form is loaded, and ‘stageshow_OnClickReserve’ runs when the Reserve button is clicked.
Thread Starter
eric3d
(@eric3d)
Thanks for the prompt fix. I tried adding the following function, which is properly called but the input value is not changed. I suspect the function is called before the form is created.
function stageshowCustom_OnLoadSubmitDetailsForm() {
console.log("detail form launched");
document.getElementById('checkoutdetails-salePPCountry').value = 'United States';
}
Anything I do with stageshow_OnClickReserve() seems to bypass verification altogether. I also noticed that function is defined twice.
Thread Starter
eric3d
(@eric3d)
Update: adding a recurring check until the input is created works. Not the most elegant solution though.
function stageshowCustom_OnLoadSubmitDetailsForm() {
//console.log("detail form launched");
var checkExist = setInterval(function() {
var countryInput = document.getElementById('checkoutdetails-salePPCountry');
if (typeof(countryInput) !== 'undefined' && countryInput !== null) {
//console.log("countryInput exists!");
countryInput.value = 'United States';
clearInterval(checkExist);
}
}, 100); // check every 100ms
}