Forms field names and values

Forms fields can be accessed in the JSON-configuration by using the prefix “forms_” and then adding the field’s “name” set in Lime Forms.

In Lime Forms it’s possible to set both label (visible for the end user) and name (not visible for end user) for each field. It’s the name we want to use to access field values, not the label.

Get Form values

Here’s a few examples where we get values from the form and set to certain Lime fields.

Example 1

Forms fields 1

    "create_object": {      
      "name": "forms_companyname",  // Set the Lime field “name” to the value of the Forms field “companyname”
      "address": "forms_ address"   // Set the Lime field “address” to the value of the Forms field “address”
    }

Example 2

Forms fields 2

    "create_object": {      
      "firstname": "forms_firstname",   // Set the Lime field “firstname” to the value of the Forms field “firstname”
      "lastname": "forms_lastname", // Set the Lime field “lastname” to the value of the Forms field “lastname”
      "email": "forms_email",       // Set the Lime field “email” to the value of the Forms field “email”
      "mobile": "forms_mobilephone",    // Set the Lime field “mobile” to the value of the Forms field “mobilephone”
    }

Use pre-defined values

Fields can also contain certain pre-defined values, where you might get some values from the form and some values are pre-defined.

Here’s an example of a mix between form values and pre-defined values.

Forms fields 3

    "create_object": {      
      "name": "forms_companyname",      // Set the Lime field “name” to the value of the Forms field “companyname”
      "address": "forms_ address"       // Set the Lime field “address” to the value of the Forms field “address”
      "coworker": 4001                  // Set the Lime field “coworker” to the pre-defined value 4001
      "note": “New potential customer”  // Set the Lime field “note” to the pre-defined value “New potential customer”
}