NetTalk Central

Author Topic: Close button (X in upper right of form)  (Read 2248 times)

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Close button (X in upper right of form)
« on: March 02, 2015, 10:32:59 AM »
     When a user inserts a new record, a pop-up form appears.  They may enter some data then decide to cancel.  If they click the cancel button at the bottom of the form, the form is closed and no data is saved to the file.  However, if they instead, click on the X in the upper right corner of the form, the form is closed but data is still sent to the file.  Basically,it looks like auto incremented fields and primed fields are sent to the file.  This seems counter-intuitive as the user has requested to close and did not click (request) to save.
     Any suggestions on how to handle this?  I would like to see if I could turn off the X in the upper right.

Thanks,

Jeff

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: Close button (X in upper right of form)
« Reply #1 on: March 02, 2015, 01:08:41 PM »
     To turn off the Close button in the upper right, I have the following XHTML entered, before the form:

<style>
.ui-dialog-titlebar-close{
 display: none;
}
</style>

Seems to work well.  Comments, suggestions, corrections welcome!

Jeff

TomD

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Close button (X in upper right of form)
« Reply #2 on: March 03, 2015, 01:06:01 AM »
Hello Jeff,

One option that You can check is in Form settings: NetWebSettings -> Advanced Tab -> Prime auto inc if necessery (checked), Prime auto inc even if not necessery (unchecked).

This should do the trick unless on Your form there are for example browse procedures (childs) and lets say on second tab You add some child records. This is a bit harder to deal with because the record have to be always primed so the child record knows its parent ID. Let me know if this is the case.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: Close button (X in upper right of form)
« Reply #3 on: March 03, 2015, 01:32:38 AM »
hi Jeff,

you can suppress the X but that won't really solve the problem.
The user might just navigate away from the form - they may close the browser or do a dozen other things that mean that Save and Cancel were not pressed.

this has been discussed on the webinar a few times, but ideally;

a) you don't use auto-numbering in the first place. This is not always possible, but represents the ideal approach. this is the best fix if you can do it.

b) You don't have "dependent" tables on the same form. (ie so auto-numbering doesn't need to write the parent record early, in order to allow children). This is do'able in some cases, but can lead to a clumsy interface, so is not my favorite.

c) you use an additional "status" type field in the parent file - which is only set to true when the user clicks on Save. records with status=0 are not displayed in the browse, and are periodically removed from the database. This is the best option if you must use auto-numbering.

cheers
Bruce