NetTalk Central

Author Topic: NetWebForm: How can I change the position of the Save button?  (Read 4262 times)

Jeffrey Kuijt

  • Full Member
  • ***
  • Posts: 142
    • View Profile
    • Email
Hi,

Question 1
On a NetWebForm, how can I change the position of the Save (Submit) button?
I have just one input field and want to have the Submit button after this field on the same line.
I understand that I cannot use an Other button, because when the user press on the Enter key (cursor is still in the input field!) then the ValidateAll routine won't take place.
So I have to use the default Save button which I can tick on in the templates.

Question 2
Can the Save button als be hidden?
BUT validation of all fields must be taken place, when the user hits the Enter key. Is that possible?

Best regards
Jeffrey
« Last Edit: May 06, 2012, 06:09:09 AM by Jeffrey Kuijt »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11297
    • View Profile
Re: NetWebForm: How can I change the position of the Save button?
« Reply #1 on: May 06, 2012, 09:24:22 PM »
Hi Jeffrey,

>> On a NetWebForm, how can I change the position of the Save (Submit) button?
I have just one input field and want to have the Submit button after this field on the same line.

the trick here is to turn off the "save" button on the layout tab.
Then _add_ a button (of type save) into your form.
So obviously, you can put it inline with the other fields.
cunning heh?

>> I understand that I cannot use an Other button, because when the user press on the Enter key (cursor is still in the input field!) then the ValidateAll routine won't take place. So I have to use the default Save button which I can tick on in the templates.

This is a form, not a browse, so here there are a variety of "types" for a button. (And indeed "other" isn't one of them.)

If you add the css class "nt-hidden" to the button I believe it'll become invisible, but still work if the user presses enter. You may need to test that. However I would rather recommend leaving a small "login" button visible to the user. There are many cases where it's not obvious you need to press "enter" (on screen keyboards being the most obvious) and so giving the user a button to press is a good thing.

Cheers
Bruce


Jeffrey Kuijt

  • Full Member
  • ***
  • Posts: 142
    • View Profile
    • Email
Re: NetWebForm: How can I change the position of the Save button?
« Reply #2 on: May 07, 2012, 12:58:53 AM »
Thanks Bruce,

I will try some options.

Best regards
Jeffrey