Back button not working on readonly form

Version 8.4

I have developed a form, once the values are entered, I am generating a readonly form for confirmation. Back button on this page is not working, it is cancelling the form, instead of navigating back to first page for editing the entered values. Any fixes will be helpful

Hello @himabindu306

For using back button to go into previous page you can try below approach:-

  • Make sure your form is explicitly multi-page handled by form navigation buttons
  • Replace cancel button with previous in confirmation page
  • Ensure field names are consistent between pages

Try to use below sample code for previous button

<Form name="UserInputConfirmationForm">
  
  <!-- Page 1: Input Form -->
  <Page name="InputPage" title="Enter User Information">
    <Field name="username" displayName="Username" type="string" required="true"/>
    <Field name="email" displayName="Email Address" type="string" required="true"/>

    <!-- Navigation Button -->
    <Button type="next" label="Next"/>
  </Page>

  <!-- Page 2: Confirmation Page -->
  <Page name="ConfirmationPage" title="Confirm Your Information" readOnly="true">
    <Field name="username" displayName="Username" type="string" readOnly="true"/>
    <Field name="email" displayName="Email Address" type="string" readOnly="true"/>

    <!-- Back and Submit buttons -->
    <Button type="previous" label="Back"/>
    <Button type="submit" label="Submit"/>
  </Page>

</Form>

1 Like

Hi
Use type="previous" for the back button to return to the previous page. Avoid using type="cancel" here, as that will discard the form.

@himabindu306 If my response has helped you can you please mark my response as solution. It will be grateful :slight_smile:

Tried Using previous parameter, but still same issue. Attached are the form and workflow details for reference
Form.txt (2.1 KB)
workflow.txt (5.4 KB)

Hi @himabindu306 ,

Update the form button and workflow Transition logic.
form.xml (1.9 KB)
Workflow.xml (5.2 KB)

  <Button action="back" label="Back"/>
  <Button action="next" label="SUBMIT"/>
  <Button action="cancel" label="Cancel"/>

When the back button is clicked, the work item status is set to ‘Rejected’. Add a transition to ‘Present Identity Form’ if the work item is rejected(click back button).

  <Step icon="Approval" name="Confirm Entered Values" posX="676" posY="126">
    <Approval mode="serial" name="Confirm Entered Values" owner="ref:launcher" return="exitWorkflow,back" send="identityModel,identityName,launcher">
      <Arg name="workItemDescription" value="script:return &quot;Confirm values for&quot;+$(identityModel.firstname);"/>
      <Arg name="workItemFormBasePath" value="ref:basePath"/>
      <Arg name="workItemForm" value="ref:readOnlyForm"/>
    </Approval>
    <Transition to="Update IdentityModel" when="approved"/>
    <Transition to="Present Identity Form" when="!approved"/>
  </Step>

Thanks Arun, it worked

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.