Two different smart forms when adding features and editing features

492
2
Jump to solution
03-17-2022 08:40 AM
CorryneVincent
New Contributor III

Hi!

Is their a way to create two different smart forms for different actions on one single hosted feature layer?

Could I have one smart form for when I edit attributes on a point and then have a different form for when I add a new point to that same layer? From what I tested, it's not possible, but I might have missed something!

It could be awesome to do so as some restricted fields and conditionnal visibility shouldn't be the same for the two actions!

 

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Today, the best way to do this is to duplicate the layer in the map and create two forms. If you need to support offline workflows, you should create a view layer and add at to the map as the second layer. There is a limitation where duplicate map layers cannot be taken offline - this works around that.

In the future, we are considering adding an Arcade "$editContext" global variable which will allow you to tailor your visibility logic based on if a feature is being created or updated. This way you could have a single form that behaves differently when collecting new data vs updating existing data.

View solution in original post

2 Replies
RhettZufelt
MVP Frequent Contributor

If you add the same data into the web map twice, and set the forms differently, you can have this option.

Easiest to rename/symbolize each layer to make it more clear.

When you add a point, you select the add template, if you want to edit one, when you click on the point, select the edit one.

R_

0 Kudos
by Anonymous User
Not applicable

Today, the best way to do this is to duplicate the layer in the map and create two forms. If you need to support offline workflows, you should create a view layer and add at to the map as the second layer. There is a limitation where duplicate map layers cannot be taken offline - this works around that.

In the future, we are considering adding an Arcade "$editContext" global variable which will allow you to tailor your visibility logic based on if a feature is being created or updated. This way you could have a single form that behaves differently when collecting new data vs updating existing data.