Skip to main content

Previous Step ID Support in Conditional Redirect

Intro

Setting the previous step item's ID allows for the creation of a conditional redirect event in a web app. This functionality enables dynamic redirection based on specific conditions, enhancing user experience and interaction within the application. By leveraging this feature, you can tailor the user journey more effectively, directing users to relevant content or actions based on their previous interactions.

From this video tutorial you can know how to set the previous step item’s ID to create a conditional redirect event for your web application.

DrapCode Builder Create New Record

1. Create an Event to Save Data

You will have to create an event in order to save data then choose Edit. For this go to Events and click Add Event.

DrapCode Builder Create New Record

1.1 Add Event Details

Add the collection to save data. You can add a confirmation message too such as success, error etc.

DrapCode Builder Create New Record

1.2 Conditional Redirect

Create an event to create conditional redirect.

DrapCode Builder Create New Record

1.3 Add Event Details

In the option choose Edit. In the pop up that appears choose the data location, the collection, field, field value, page, target and path field.

DrapCode Builder Create New Record

2. Bind the Event

Drop a Collection Form from Components and open its Settings. In the pop up that appears choose the collection and the event to bind and Save the settings.

DrapCode Builder Create New Record

3. Preview the Changes

Click Preview and you will find the data box. Here you can add a new record and click Submit. This will save the data. Refresh the page to view the newly added record.

DrapCode Builder Create New Record

3.1 View the Changes

Refresh the collection and the newly added record will appear here as well.

DrapCode Builder Create New Record

4. Preview the Changes

Click Preview and you will find the data box. Here you can add a new record and click Submit. This will save the data. Refresh the page to view the newly added record here as well as in the collection.

DrapCode Builder Create New Record

Conclusion

One benefit is the ability to dynamically redirect users based on specific conditions, enhancing user engagement and optimizing the user experience within the web app.