Custom button next to "Save" and "Cancel" on Edit Form

Is it possible, through a UI Model, to add a custom button to an edit form, next to the Save and Cancel buttons?


My edit form is a bunch of tabs, and I want a "Clear All Criteria" button visible at all times, and possibly a "Validate" button.  Just not sure how to do this.

Comments

  • The only way I'm aware of would be to use some javascript in your UI Model to dynamically create (or reposition) buttons at that location. If you're generating the HTML for your form already though, you could try to move the buttons outside of your tabbed container. That should allow you to reposition the buttons with only some CSS rules.
  • Hi Rick

    We have created a totally new form with different actions. Adding them in the UIAction section of the form exposes them to the UI model, which can then be used to call a stored proc when the button is clicked.


       <c:UIActions>

          <c:UIAction ActionID="KEEP" Caption="Keep" Description="Keep" />

          <c:UIAction ActionID="REJECT" Caption="Reject" Description="Reject" />

          <c:UIAction ActionID="ACCEPTLETTER" Caption="Accept farewell letter only" Description="Accept farewell letter only" />

        </c:UIActions>


        <c:DialogActions>

          <c:UIAction ActionID="KEEP" />

          <c:UIAction ActionID="REJECT" />

          <c:UIAction ActionID="ACCEPTLETTER" />

          <c:Cancel Caption="Close" />

        </c:DialogActions>



    You then over-ride the SaveDetails method with a custom one.


           private void SaveDetails()

            {

                RequestContext requestContext = this.GetRequestContext();


                string validationResult = "";

                if (saveMode == SaveMode.KEEP)

                {

                    validationResult = "KEEP";

                }

                if (saveMode == SaveMode.ACCEPTLETTER)

                {

                    validationResult = "ACCEPT FAREWELL LETTER ONLY";

                }

                if (saveMode == SaveMode.REJECT)

                {

                    validationResult = "REJECT";

                }

               etc....


    There is no Java script involved

    Happy to send the full .cs if you would like it, 

    Phil


     

Categories