The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Is it possible to disable the action of a Confiforms form?

Curtis Freudigmann
Contributor
November 7, 2018

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)

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 7, 2018

Are you essentially trying to do what is happening on this page Opening and closing a dialog example?

 

https://docs.atlassian.com/aui/7.9.9/docs/dialog2.html

Curtis Freudigmann
Contributor
November 9, 2018

Yes, this is precisely what I was trying to do. Thank you very much.

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 9, 2018

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>
Curtis Freudigmann
Contributor
November 9, 2018

Thank you for this. I followed the link you initially posted and modified that to suit my needs.

Thanks again!

TAGS
AUG Leaders

Atlassian Community Events