# Builder Fields & Acai Attributes ## Field Types (`data-field-type`) The builder uses `data-field-type` attributes on HTML elements to define editable areas. | Type | Description | Returns | |------|-------------|---------| | `textfield` | Single line text | String | | `headfield` | Heading text (generates `_tag` variable for semantic tag: h1-h6) | String | | `textbox` | Multi-line text | String | | `wysiwyg` | Rich text editor (HTML output) | HTML string | | `link` | URL field (already includes slashes) | String | | `upload` | Single image/file | Array: `[0].urlPath`, `[0].info1` (alt), `[0].info2-4` | | `uploadMulti` | Multiple images | Iterable: `item.urlPath` | | `list` | Dropdown (fixed options or from table) | String or foreign key num | | `multiv2` | Repeatable group of fields | Array of objects | ### headfield Example ```html <{{ title_tag | default('h2') }} data-field-type="headfield" class="text-3xl font-bold"> Section Title ``` ### upload Example ```html {{ image[0].info1 }}
{{ photo.info1 }}
``` ### list Example ```html ``` ## Acai Attributes ### `c-if` — Conditional Rendering ```html
Banner content
Grid layout
{{ subtitle }}
``` ### `c-else` Must immediately follow the `c-if` element: ```html

No image available

``` ### `c-for` — Iteration ```html

{{ item.title }}

{{ product.nombre }}

``` Available inside loop: `loop.index` (1-based), `loop.index is odd`, `loop.index is even` ### `c-class` — Dynamic CSS Classes ```html
Content
``` ### `c-hidden` — Hidden Elements Element is not rendered but can declare builder variables: ```html
``` ### `c-required` — Conditional Required Fields ```html ``` ## Forms (`c-form`) Complete form handling with automatic validation, storage, and email sending. ```html
``` ### c-form Attributes | Attribute | Description | |-----------|-------------| | `tableName="'table'"` | Store submissions in database table | | `mailRecord="['correos', 'ID']"` | Email template from `correos` table | | `sendTo="'email@domain.com'"` | Recipient email(s), comma-separated | | `sendToClient="'fieldname'"` | Field containing client's email for auto-reply | | `captcha="true"` | Enable Google reCAPTCHA | | `honeypot="true"` | Anti-spam hidden field | | `messageOK="'text'"` | Success message | | `messageKO="'text'"` | Error message | | `redirect="'/path/'"` | Redirect after successful submit | | `attachFiles="true"` | Attach uploaded files to email | | `showImages="true"` | Show image thumbnails in email | ## Built-in Components ### Carousel (`c-tns-wrapper`) ```html
``` ### Lightbox ```html ``` ### Breadcrumb ```html ``` ### Animate On Scroll (AOS) ```html
Animated content
``` ### Lazy Loading ```html ```