Discussions

Expand all | Collapse all

Alert popup should not save

  • 1.  Alert popup should not save

    Posted 10 days ago
    Edited by Alexus Hill 9 days ago
    I created a javascript help popup alert and when the user 'ok' the message the record saves when it should just  acknowledge 'ok' and allow the user to continue editing the form. How can I fix this?
    #Forms #record#Button #save#javascript
    ------------------------------
    Alexus Hill
    ------------------------------
    ​​​​​​


  • 2.  RE: Alert popup should not save

    Posted 7 days ago
    Have you tried adding custom data rules on the table. Go to table setting-advance settings and scroll down to locate custom data rules. These rules replaces form rules and gives you more control to validate your form data before it saves.

    ------------------------------
    Babi Panjikar
    ------------------------------



  • 3.  RE: Alert popup should not save

    Posted 7 days ago
    I took at look at that, and I'm not sure that would apply here

    ------------------------------
    Alexus Hill
    ------------------------------



  • 4.  RE: Alert popup should not save

    Posted 7 days ago
    If you could post the code you are using and exactly how you are using it that would be a huge help. It is hard to provide a solution when nobody knows exactly what is happening to you. Can you explain what you are trying to make happen? Is this a popup to tell someone they entered bad data in some way, if so the custom data validation rules might make sense to use. If it is just an informational popup not related to saving the record then you might need to go another way.


  • 5.  RE: Alert popup should not save

    Posted 7 days ago
    This is my code below, I am trying to create a help alert button that will help assist users in editing a record properly. When I am testing this help button in edit mode and press 'ok' after the pop up appears. The record then saves and leaves editing mode. When I need to the form to stay in editing mode so they can continue to fill out the form and save it when they're done. 

    "javascript: (alert ('1. You must select all healthcare options before totals will calculate.\\n2. A PEG Company and start date/effective date are required in order for the Healthcare Option to populate.'));"

    ------------------------------
    Alexus Hill
    ------------------------------



  • 6.  RE: Alert popup should not save

    Posted 7 days ago
    Edited by Tom Musto 7 days ago
    What action triggers the popup alert and what code is being used?

    ------------------------------
    -Tom
    ------------------------------



  • 7.  RE: Alert popup should not save

    Posted 7 days ago
    I am using a javascript alert function, below is my code

    "javascript: (alert ('1. You must select all healthcare options before totals will calculate.\\n2. A PEG Company and start date/effective date are required in order for the Healthcare Option to populate.'));"

    ------------------------------
    Alexus Hill
    ------------------------------



  • 8.  RE: Alert popup should not save

    Posted 7 days ago
    Edited by Tom Musto 7 days ago
    I see above where you're saying that it's to help a user properly fill out a form, but what action or event happens on the form that triggers the alert? Is it an action by the user (e.g. pressing the save button, a custom button)? A javascript event (e.g. focus, blur)? If a custom button, is there anything else in it besides what you provided?

    ------------------------------
    -Tom
    ------------------------------



  • 9.  RE: Alert popup should not save

    Posted 7 days ago
    There is a help button that is there for the user to press that will trigger the popup alert.

    ------------------------------
    Alexus Hill
    ------------------------------



  • 10.  RE: Alert popup should not save

    Posted 7 days ago
    Ok, if there is no other javascript interfering with the alert, try this:

    "javascript:void(alert ('1. You must select all healthcare options before totals will calculate.\\n2. A PEG Company and start date/effective date are required in order for the Healthcare Option to populate.'));"

    The addition of the void function should keep you on the page after "OK" is pressed on the alert.

    ------------------------------
    -Tom
    ------------------------------



  • 11.  RE: Alert popup should not save

    Posted 7 days ago
    Thanks, but unfortunately the form is still saving. I've tried that before and just now with the no success.

    ------------------------------
    Alexus Hill
    ------------------------------



  • 12.  RE: Alert popup should not save

    Posted 7 days ago
    I put the javascript void formula above into a Formula - URL field, went into edit mode on a record, pressed the button, and then pressed "OK" on the alert popup. I was able to stay on that same record in edit mode. If this is not working for you, there must be something else going on with your javascript code or the button. You would have to provide more detail on how the button is set up and any other javascript code that might be interacting with the form.

    ------------------------------
    -Tom
    ------------------------------



  • 13.  RE: Alert popup should not save

    Posted 7 days ago
    So I am also using a formula URL field, but thank you, it has to be some other coding that its interfering with this. I'm going to keep looking into this and see what I can find

    ------------------------------
    Alexus Hill
    ------------------------------