How Can We Help?

Search for answers or browse about Sintel Forms.

Set & clear field values using rules

You are here:

The setValue function within our JavaScript API allows you to set or clear any value on a form field. This function can be used within Steps that you can add to Rules on the Logic section of the Sintel Forms Designer

Below you will find code snippets for setting and clearing a field value for different field types.

 

User (both single and multi select)

Set it…

let user ={displayName: "Joe Bloggs", id: "joebloggs@example.com"}
setValue("InternalFieldName",[user]);

Clear it…

setValue("InternalFieldName", [])

 

 

 

Lookup (single)

Set it…

setValue("InternalFieldName",ID of the lookup item)

Clear it…

setValue("InternalFieldName", [])

 

 

 

Lookup (multi)

setValue("FieldName", [])

Date (with and without the time part)

setValue("FieldName", null)

Choice (single)

setValue("FieldName", null)

Choice (multi)

setValue("FieldName", [])

URL/image

setValue("FieldName", null)
setValue("Url", {description: "Test", url: "https://www.test.com"})

Currency/number

setValue("FieldName", "")

Text

setValue("FieldName", "")

 

Was this article helpful?
0.5 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 100%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents