How can I add a screen with a notice to indicate that the form was submitted successfully??

After clicking the submit button, the data was submitted but the screen does not change, this can be a bit confusing for the user (to know if the form was submitted).

After click submit button,

1. How can I add a screen with a notice to indicate that the form was submitted successfully??

2. How can I add a button or link to send a new form or restar the form??

In the image bellow i click the submit button, the data was sent, but the screen doesnt change or clear the fields to sent a new form

  Discussion posts and replies are publicly visible

  • 0
    Certified Senior Developer

    You can show another user input task on the successful completion of the previous form by using activity chaining. Another way out is you can create a local variable and set the value as 1 and set the show when the functionality of the actual page and the confirmation page. on click of submit button you can change the value of that local variable to show another component to let the user know about the completion of the form.

    a!localVariables(
      local!formToShow: 1,
      {
        a!richTextDisplayField(
          showWhen: local!formToShow=1,
          value: a!richTextItem(
            text: "Editable Form",
            style: "STRONG",
            size: "LARGE"
          )
        ),
        a!richTextDisplayField(
          showWhen: local!formToShow=2,
          value: a!richTextItem(
            text: "Confirmation Form",
            style: "STRONG",
            size: "LARGE"
          )
        ),
        a!buttonLayout(
          primaryButtons: {
            a!buttonWidget(
              showWhen: local!formToShow = 1,
              label: "Submit",
              saveInto: { a!save(local!formToShow, 2) }
            ),
            a!buttonWidget(
              showWhen: local!formToShow = 2,
              label: "Ok",
              saveInto: { a!save(local!formToShow, 1) }
            )
          }
        )
      }
    )

  • 0
    Certified Lead Developer
    in reply to Deepak gupta

    "Another way out is you can create a local variable and set the value as 1 and set the show when the functionality of the actual page and the confirmation page. on click of submit button you can change the value of that local variable to show another component to let the user know about the completion of the form."

    Be careful here. This will NOT work. The user input task will not reevaluate on a successful submit and will not display your message.

    Check this: appian.rocks/.../

  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    Stefan, it is for the one if we are not using Process model. If we are using stand-alone interface in the site.

  • 0
    Certified Senior Developer

    on submit button call webapi(exposing a process model) and then onsucess increase the local!step+1 onerror don`t move to next step. Your step+1 contain the success form

    choose(
    local!choosenStep,
    rule!NHP_SC_Step1(
    formContent: local!formContent,
    choosenStep: local!choosenStep,
    sessionId: local!sessionId,
    questionSummary: local!questionSummary,
    calculatedRiskProfile: local!calculatedRiskProfile
    ),
    rule!NHP_SC_Step2(
    formContent: local!formContent,
    choosenStep: local!choosenStep,
    calculatedRiskProfile: local!calculatedRiskProfile
    ),

    )

    button:  a!buttonWidget(
    label: rule!NHP_getLookUpValue(
    keyId: "button.continue",
    lookup: ri!formContent
    ),
    saveInto: {
    rule!NHP_PUT_INTERNAL_API(
    questionnaireId: local!selectedQuestionaireId,
    sessionId: local!selectedSessionId,
    questionId: local!questionId,
    values: local!value,
    onSuccess: {


    if(
    local!resultStatus = "Success",
    {
    a!save(ri!choosenStep, ri!choosenStep + 1)


    },
    {}
    )

    },
    onError: { a!save(local!error, fv!error) }
    ),

    },

    size: "STANDARD",
    width: "FILL",
    style: "PRIMARY",
    loadingIndicator: true,
    validate: true()
    )