Forum Discussion

AlexusHill's avatar
AlexusHill
Qrew Member
6 years ago

Alert popup should not save

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
------------------------------
​​​​​​
  • What action triggers the popup alert and what code is being used?

    ------------------------------
    -Tom
    ------------------------------
    • AlexusHill's avatar
      AlexusHill
      Qrew Member
      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
      ------------------------------
      • TomMusto's avatar
        TomMusto
        Qrew Cadet
        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
        ------------------------------
  • AustinK's avatar
    AustinK
    Qrew Commander
    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.
    • AlexusHill's avatar
      AlexusHill
      Qrew Member
      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
      ------------------------------
  • BabiPanjikar's avatar
    BabiPanjikar
    Qrew Assistant Captain
    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
    ------------------------------
    • AlexusHill's avatar
      AlexusHill
      Qrew Member
      I took at look at that, and I'm not sure that would apply here

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