Display a "Alert Message Box" in Browser Enabled forms - InfoPath Dev
in

InfoPath Dev

Display a "Alert Message Box" in Browser Enabled forms

Last post 04-19-2015 11:16 PM by umashiva. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-18-2015 11:47 PM

    Display a "Alert Message Box" in Browser Enabled forms

    Hi All, I working on Browser Enabled Forms in InfoPath 2010, On a button click event i just want to display an Alert Message Box If any one knows, Please help me in that. Thanks,
  • 03-23-2015 10:29 AM In reply to

    Re: Display a "Alert Message Box" in Browser Enabled forms

    Hi,

     

    In order to display an Alert Message, you need to use an extra view.

    So if the conditions are correct execute a view switch. Set up the view however you want.

    If yes, they return to the previous view. If no, the text box with the "Alert Message" appears and once data is entered a continue or any other button appears. When clicked, they proceed to the next view.

    Hope this helps.  Thanks!

     

    -Prachi 

  • 03-23-2015 10:00 PM In reply to

    Re: Display a "Alert Message Box" in Browser Enabled forms

    Hi Prachi, Thanks for your response. But, couldn't clear your points. Can you please explain me in detail with some code logic or example? Uma
  • 03-24-2015 08:47 AM In reply to

    Re: Display a "Alert Message Box" in Browser Enabled forms

    Hi Umashiva,

    Sorry, if I wasn't clear earlier. What I meant was that you could try to switch to another view. You build a view with an Alert message textbox and a back button to get back to your previous view. As soon as an error occurs, you set a value to a field that triggers a rule that switches view to display the Alert message. You could use a calculated value for this - add a calculated value to the form with some text in it for the warning you wish to display, and conditionally format it to hide if the number field is >= 0.

    Browser enabled forms are really restrictive in their functionality. Alerts are not allowed and Microsoft recommends using hidden sections to display messages. i.e. create a hidden section with a text box with message and keep it hidden until you want to display it on some trigger. You can use an expression box which hides if blank, and shows "Alert message" when text is placed into it. Then when you want to display a message, you populate that field, and the expression box displays. Not the best choice in many cases, but it works.

    Hope this helps. Thanks!

    -Prachi 

  • 04-16-2015 09:49 AM In reply to

    Re: Display a "Alert Message Box" in Browser Enabled forms

     Hi Umashiva,

    You can kick off alerts in a browser enabled form using JavaScript, content editor web-part, and a browser developer add-on (firebug) . It's not the best approach in my opinion, but I've used them successfully. Do the following:

    1. Add a content editor webpart
    2. Using firebug, find the (#id) if the control you want to alert on
    3. Create java script file with alert box code and control id#
    4. Place script file in asset library and point to it via the CE webpart
    5. Click button for alert.
  • 04-19-2015 11:16 PM In reply to

    Re: Display a "Alert Message Box" in Browser Enabled forms

    Hi Ghozt, Thanks for your response. I am clear with your points... but inside a form, on a button click event i need to trigger a alert message about to remind a user to save a form. ASP.Net web forms used to have validation alerts.. similarly my end user wants to get an alert. can we do such things... Please guide me on that.. Thanks
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.