Ichmed / dna

0 stars 0 forks source link

Turn widgets into sub module #13

Open Ichmed opened 3 years ago

Ichmed commented 3 years ago

Remove widgets from rulebook and turn it into its own submodule and host on github

related to #11

Format Strings

name type? (parametername:type?:error?)*

name

unique widget name (Exception for duplicates)

type

sets default parameters and handles display if widget construction is disabled. defaults to display

parameters

name

The name of the parameter

type

Used for sanitation and default error handling, new types can be registered. defaults to text

any type can be appended with a list of valid choices e.g int[0,1,2] or regexes e.g {"[abc\d]"}

error

A regex used to format a custom error message, otherwise default will be used

examples

list search Create a list of matching results formatted as links

table search exclude:list include:list Create a table containing fields from the model excluding any/limiting to the given lists

Calling widgets

$(name "parameter") $(name parametername="value")