Documentation Index
Fetch the complete documentation index at: https://docs.joyfill.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
You can define custom draggable field options for your users. This allows you to preconfigure fields with styles, settings, and any other property supported by the JoyDoc Spec. When your user drags and drops one of your pre-configured fields onto the page, that field will have the properties pre-set when the field is created. You can use any of the JoyDoc JSON supported properties on your list of custom fieldOptions.Examples
Customize
You can customize the list of available draggable options within the Joyfill Builder by providing your own JS Objects in the list. For instance, in the example below we define some pre-configured styles (fontColor, fontWeight, and fontSize) and an identifier to be used when the field is created. When a user drags and drops your custom pre-configured fields onto the page it will have these properties set by default.Group Fields
You can group field options into a collapsable accordion by using the fieldGroup type in the field option list and nesting your field objects under the fields property of the field group. This is a great tool for organizing the field options list, especially if you have a lot of custom fields.Joyfill Default Draggable Fields
Below is the default list of JS Objects used by Joyfill internally to define our standard list of draggable field options. You can add to this list, customize it, and do whatever you need to provide the proper experience to your customers. In the example below, thegenerateObjectId method is provided by the Joyfill Components Module as an export. You can use it to generate a valid _id. See guide Generating Object Ids.
You can also pass custom icons to field options. The custom icons can either be an image url or svg. The iconType property must be specified as url incase of an imageUrl whereas it should be specified as custom incase of a custom svg