FormSanity Attributes

Fields
Field #1:

basic text field

Field #2:

basic select list

Field #3:

basic multi select list

Field #4:

must be a number

Field #5:

also a number

Field #6:

must be a date

Field #7:

must be a time

Field #8:

must be a duration

Field #9:

square brackets in field name

Field #10
Field #11
Tests
Argument Test
fs_display="field_one == 'Brown'" What can brown do for you?
fs_enable="field_one == 'Pink'"
fs_display="field_two != 'Torch Red'" You have not selected Torch Red
fs_display="(field_two != 'Torch Red' && field_two != '')" You have selected something that's not Torch Red
fs_display="(field_eleven != 'Brick Red' && field_eleven != '')" You have selected something that's not Brick Red
fs_display="field_three == 'Orange'" Orange is one of the selected options
fs_display="field_ten == 'Green'" Green is one of the selected checkboxes
fs_display="field_one == ''" Field #1 field is empty
fs_display="field_one != ''" Field #1 is not empty
fs_display="field_ten == ''" No checkbox is selected
fs_display="field_eleven != ''" A radio button is selected
fs_display="field_eleven == 'Canary Yellow'" You selected Canary Yellow
fs_display="field_four > 100" Wow. You know big numbers.
fs_display="field_four < 100" Less than 100
fs_display="field_four >= 500" Greater than or equal to 500
fs_display="field_four <= 500" Less than or equal to 500
fs_display="field_five > 3" Greater than three
fs_display="field_six >= '02/20/2009'" Not before Jans's birthday
fs_display="field_seven < '2:30pm'" Before 2:30pm
fs_display="field_eight <= '10:00'" 10 hours or less
fs_display="(field_two == 'Sky Blue' && field_eleven == 'Midnight Blue')" You have selected Sky Blue and Midnight Blue
fs_display="(field_two == 'Burnt Orange' || field_two == 'Lemon Yellow')" You have selected Burnt Orange or Lemon Yellow
fs_display="(field_eleven == 'Vivid Violet' || (field_three == 'Red' && field_ten == 'Blue'))" You have selected "Vivid Violet" or "Blue & Red" (or both)
fs_display="(field_ten == 'Green' && field_ten == 'Blue')" You have selected "Green" and "Blue"
fs_display="field[nine] == 'Option 3'" You have selected Option 3
fs_display="field[nine] == 'Option 3'" You have selected Option 3
fs_display="(field_ten != '' && field_eleven != '')" Field #10 and field #11 are answered
Enable select list options via Field #10
Display select list options via Field #10

Needs correct answer.

Submit
Notes

Comparison Operators

You can use any of the following operators to compare a field to a value:

  • == "equal to"
  • != "not equal to"
  • <  "less than"
  • <= "less than or equal to"
  • >  "greater than"
  • >= "greater than or equal to"

Fields that contain multiple values (multiple select lists and checkbox arrays):

  • == "contains"
  • != "does not contain"

Logical Operators

You can use the following operators to compare multiple fields to multiple values:

  • && "both conditions are true"
  • || "either condition is true"

When you use logical operators, you must enclose the entire statement in parenthesis.

Grouping

You can use parentheses to group parts of a conditional statement together.