To be more specific, I have a number of forms throughout my pages which are set up to be dialog boxes. Now I have received a request to create a pop up alert. Essentially give the user the ability to click a tool tip, dialog box shows up with information, then the user can click cancel or X out of it.
I currently have it set up right now where my form has one field which is hidden. The only thing else that's in there is an Info Macro.
I would like the user to be able to just view this dialog box, close it and move on, however, if the user clicks accept or register etc, it adds a record for them(albiet an empty one). I would like to remove the ability to actually register the form.
I want the form to show up, show the information, and then be able to be closed (without needed to click accept)
Are you essentially trying to do what is happening on this page Opening and closing a dialog example?
Yes, this is precisely what I was trying to do. Thank you very much.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If that's the case then you could do it fairly easily with a user macro. I whipped this up pretty quickly based on the AUI documentation.
Macro Name:
aui_dialog
Macro Title:
AUI Dialog
Macro Body Processing:
Rendered
Template:
## Developed by: Davin Studer ## Date created: 11/09/2018 ## @param Open:title=Open Button Text|type=string|required=true|desc=Text for the open button. ## @param Close:title=Close Button Text|type=string|required=true|desc=Text for the close button. ## @param Header:title=Header Text|type=string|required=true|desc=Text in the dialog box header. <!-- Create a trigger which will be used by the JavaScript --> <button id="dialog-show-button" class="aui-button">$paramOpen</button> <section id="demo-dialog" class="aui-dialog2 aui-dialog2-small aui-layer" role="dialog" aria-hidden="true"> <header class="aui-dialog2-header"> <h2 class="aui-dialog2-header-main">$paramHeader</h2> <a class="aui-dialog2-header-close"> <span class="aui-icon aui-icon-small aui-iconfont-close-dialog">Close</span> </a> </header> <div class="aui-dialog2-content"> $body </div> <footer class="aui-dialog2-footer"> <div class="aui-dialog2-footer-actions"> <button id="dialog-submit-button" class="aui-button aui-button-primary">$paramClose</button> </div> </footer> </section> <script type="text/javascript"> AJS.toInit(function(){ // Shows the dialog when the "Show dialog" button is clicked AJS.$("#dialog-show-button").click(function(e) { e.preventDefault(); AJS.dialog2("#demo-dialog").show(); }); // Hides the dialog AJS.$("#dialog-submit-button").click(function (e) { e.preventDefault(); AJS.dialog2("#demo-dialog").hide(); }); }); </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for this. I followed the link you initially posted and modified that to suit my needs.
Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.