Important Concepts
Fields
7 min
fields overview in regpack, fields can be thought of as database entries for each user, and the different field types allow for different types of inputs as a user completes or updates the fields on their forms, the values within this database are updated among the usual fields which appear on your forms, there are a few special cases that should be highlighted first special user fields the fields below receive special treatment within the system and are mapped to these field ids by default (see "mapping fields" below for more on mapping) these fields should not be deleted name appears in user forms description first name yes this is responsible for the presentation of the first name within the users tab and appears within a user's forms last name yes this is responsible for the presentation of the first name within the users tab and appears within a user's forms org name yes this is an optional field available only in family/group structures that functions similarly to first name this can be displayed within the users tab for the parent user upon request main email yes this is similar to first name but also becomes the default username if the username option is not toggled on in the login widget for your project note that emails are both validated and checked against a dns database; however, the dns check can be disabled in the project settings of your project username no it is generally advised that this be the same value as main email ; however, you can provide a username other than main email if desired if you would like to use a username that is not an email address, you will need to make sure you have toggled this option on in the login widget for that project if users use the google single sign on functionality, username defaults to their google email password no passwords can be alphanumeric or special characters with a minimum length of 6 passwords are not saved as is; they go through encryption (abstraction process before going into the database) system fields there are various fields such as widgets that have special functionality and cannot be accessed directly system fields start with an underscore (i e submit for the submit button in a form) instead of accessing these directly, we provide special parameters which allow you to interact with the different aspects of the system that these fields are related to for instance, in a get info call at the user's endpoint, you would retrieve the products in a user's cart with " usercart" "true" rather than by trying to find the field id for a cart within your project check the section for the call you are working with to see the list of available system fields field types name response type validation options short answer string max character length min character length max words allowed password (6 alphanumeric and/or special characters) email (confirms only structure; use the email field for stronger validation) phone (confirms only structure; use the phone field for stronger validation) phone with 10 digits number latin characters url routing number long answer string max character length min character length max words allowed phone string both formats allow only numeric or "+" 3 input (us numbers) single input (international numbers) email string the default functionality is to check the structure and verify email against the dns database date string year range us date format (mm dd yyyy) mysql date format (yyyy mm dd) country string no validation options but allows you to present only major countries or a complete list allows you to select a default country number numeric allows you to limit the number range and present as either a drop down or a free input (inter or float) single checkbox array none yes/no array none multiple choice array if set to checkbox, this field will allow for multiple answers you have the option to send an array of strings for these fields when creating or updating users if only a single answer is required, then you are able to submit this as either a string or an array with a single value in responses for checkbox fields if there are multiple answers, an array is returned if there is a single answer, a string is returned the return will be a string stripped of all html e signature object returns timestamp, ip address, and user agent data no validation options; however, it cannot be signed by an admin (only the user may sign it) additionally, the form locks for the user after signing file upload widget array returns the hosted link of the file as well as other items such as file name, file size, and extension type making a field admin only fields can be made viewable only by admins by editing the form, clicking on the field, and setting it to admin only this can be a useful way to have your admins answer questions about a user mapping fields the ability to map fields is only available to dev admins each field in regpack that is accessible via the api has a field id that you can access by clicking on the field within the form editing module by default, these will have a format such as f 41526 37415 , but you are able to map them to any field id which does/is not (a) begin with an underscore (i e no dice ) (b) already taken by a handful of regpack mappings (we encourage you to avoid the special user field mappings) once you have mapped a field, you may access that field within the api by using the new field name for instance, the question "what is your favorite color?" might be mapped as favorite color it's important to note that mapping fields certainly comes with some risk, specifically if you have identical mappings within the same project users will overwrite answers with the same mapping which can lead to confusion this said, mapping fields is a powerful way for you to build an information network within your organization as it allows you to centralize core fields between various projects and have user data from various sources flow into this central project referencing fields in api calls fields are supplied to the api calls via doc either the native field ids or the mapping you provide serves as the keys when referencing fields in get info , the values are boolean (as in favorite color\ true ), while any other calls are expecting either a string/numeric (as in favorite color "pink" or favorite number 2 ) for multiple choice fields, values present as an array of strings (as in favorite colors \["pink", "purple"] ) finding a field id you are able to find a field id by logging in to the system and navigating to settings > forms > editing a form > and then clicking a field the field id will be in the top of the edit window