In forms if a user hits the return key Ebase interprets this as clicking the first button on the form.
Is there a way to disable this functionality/feature?
Thanks
Hitting return
Moderators: Jon, Steve, Ian, Dave
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
Hi Jon.
I've quickly done a bit more digging on this and created a rough and ready test form. We use buttons to navigate back to a menu/home page.
removed will not work! https://bradmobdev.bradford.gov.uk/ufs/returntest.eb
4 tabs
1 - expected behaviour, the button above the fields is a simple html button when I hit return I either get whinges that the mandatory fields are not populated or the Ebase event fires (add message to the event owner)
2 - expected behaviour, the button above the fields is html submit button when I hit return the event fires and a simple alert appears ie the submit action is fired.
3 - unexpected behaviour. This time I have an Ebase image with an onclick event. If I enter info in the text field I would expect the behaviour to the same as the first tab, ie the image is only an onclick not a submit.
4 - unexpected behaviour. This time I have an Ebase button with an onclick event. If I enter info in the text field I would expect the behaviour to the same as the first tab, ie it is only a simple button, not a submit.
Does this make sense?
Thanks
I've quickly done a bit more digging on this and created a rough and ready test form. We use buttons to navigate back to a menu/home page.
removed will not work! https://bradmobdev.bradford.gov.uk/ufs/returntest.eb
4 tabs
1 - expected behaviour, the button above the fields is a simple html button when I hit return I either get whinges that the mandatory fields are not populated or the Ebase event fires (add message to the event owner)
2 - expected behaviour, the button above the fields is html submit button when I hit return the event fires and a simple alert appears ie the submit action is fired.
3 - unexpected behaviour. This time I have an Ebase image with an onclick event. If I enter info in the text field I would expect the behaviour to the same as the first tab, ie the image is only an onclick not a submit.
4 - unexpected behaviour. This time I have an Ebase button with an onclick event. If I enter info in the text field I would expect the behaviour to the same as the first tab, ie it is only a simple button, not a submit.
Does this make sense?
Thanks
Last edited by Steve James on Mon Jun 26, 2017 1:04 pm, edited 1 time in total.
0 x
-
- Moderator
- Posts: 414
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
Hi Steve,
I think I understand. I believe that you are not expecting the image event to fire when you click return on tabs 3 and 4, and you'd expect the "Event" button to fire as this is below the entered fields, or the validation event to fire if no data is entered?
Can you send your form to support@ebasetech.com so that I can inspect the form.
Steve
I think I understand. I believe that you are not expecting the image event to fire when you click return on tabs 3 and 4, and you'd expect the "Event" button to fire as this is below the entered fields, or the validation event to fire if no data is entered?
Can you send your form to support@ebasetech.com so that I can inspect the form.
Steve
0 x
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
There is a way of doing this, it is easier for images than buttons.
Instead of having an Ebase click event you can configure the click on ‘html event properties’ ie do not have a server side on click event
Now the event only occurs if the user physically clicks on an image, put in a client callable script to handle the logic.
All Ebase buttons are submit so if required add an extra html event properties to change the type of the button from submit to button eg $("#btn").prop("type", "button");
More cumbersome so I don't think we'll try this approach but the image one should work ok.
Instead of having an Ebase click event you can configure the click on ‘html event properties’ ie do not have a server side on click event
Now the event only occurs if the user physically clicks on an image, put in a client callable script to handle the logic.
All Ebase buttons are submit so if required add an extra html event properties to change the type of the button from submit to button eg $("#btn").prop("type", "button");
More cumbersome so I don't think we'll try this approach but the image one should work ok.
0 x
Who is online
Users browsing this forum: No registered users and 10 guests