Malloy
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
malloy::html::form_field Struct Reference

#include <form_field.hpp>

Public Member Functions

void populate (const form_field_data &data)
 Whether a value is required.
 
std::string html_id () const
 

Public Attributes

std::string name
 
std::string type
 The field name.
 
std::string value
 The HTML type (eg. 'text', 'file', ...).
 
std::string placeholder
 The value of the field (for rendering only).
 
std::string label
 The placeholder.
 
bool required = false
 The label content.
 

Detailed Description

Type to representing a single field of an HTML form.

Member Function Documentation

◆ html_id()

std::string malloy::html::form_field::html_id ( ) const
inline

Get the HTML id.

Returns
The HTML id.

◆ populate()

void malloy::html::form_field::populate ( const form_field_data data)
inline

Whether a value is required.

Populate the value member from the parsed data content member.

Note
This will ignore/skip if the type is "password".
This will ignore/skip if the type is "file".

The documentation for this struct was generated from the following file: