{{widget_name.isVisible}}
{{widget_name.hasChanges}}
{{widget_name.data}}
Form1
. The number
{1}
is a running sequence and increments if you add more widgets of the same type, provided you have not given a unique name to your widget. For example, if you add two more form widgets to the canvas, then the default names for these widgets would be Form1
, Form2
, and Form3
.Visible
to show or hide the widget. By default, Visible
is toggled on that is enabled, so the widget is visible on page load. This property particularly comes in handy when you want to hide/show a widget programmatically or hide a widget on page load and then show it when a particular condition or data is available.Visible
and write the JavaScript code to control the widget's visibility.{{widget_name.isVisible}}
in your code.Checkbox1
onto the canvas. Rename the checkbox to ShowHideForm
and bind it to the Visible property of the form widget by enabling the JS label next to it. Add the following JavaScript code in the Visible property.hasChanges
property is set to false. Whenever the application user changes the values of the widgets embedded in the form, Appsmith sets the property hasChanges
to true. You can use this property to verify if the fields are modified and can prompt the users with a confirmation message to save or discard the changes.hasChanges
value can be read into the code, and the user can be prompted to save the data.FirstName
to form EmployeeForm
. You can access the value provided by the user in the FirstName field by using the code snippet: