struct DynFork::Fields::ChoiceI64MultField

Overview

Type of selective field with static of elements.

NOTE With multiple choice.

NOTE How to use, see example.

Defined in:

dynfork/fields/choice_i64.cr

Constructors

Instance Method Summary

Instance methods inherited from struct DynFork::Fields::Field

choices_from_json(json : String) : Nil choices_from_json, disabled=(disabled : Bool) disabled=, disabled? : Bool disabled?, errors : Array(String) errors, errors=(errors : Array(String)) errors=, field_type : String field_type, group : UInt8 group, hide=(hide : Bool) hide=, hide? : Bool hide?, hint : String hint, id : String id, id=(id : String) id=, ignored? : Bool ignored?, label : String label, name : String name, name=(name : String) name=, slug_sources : Array(String) slug_sources, warning : Array(String) warning, warning=(warning : Array(String)) warning=

Constructor methods inherited from struct DynFork::Fields::Field

new(pull : JSON::PullParser) new

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(label : String = "", default : Array(Int64) | Nil = nil, hide : Bool = false, required : Bool = false, disabled : Bool = false, readonly : Bool = false, ignored : Bool = false, hint : String = "", warning : Array(String) = Array(String).new, choices : Array(Tuple(Int64, String)) | Nil = Array(Tuple(Int64, String)).new) #

[View source]

Instance Method Detail

def choices : Array(Tuple(Int64, String)) | Nil #

Html tag: select multiple.
Example: [{5, "Title"}, {10, "Title 2"}]


[View source]
def choices? : Array(Tuple(Int64, String)) | Nil | Nil #

Html tag: select multiple.
Example: [{5, "Title"}, {10, "Title 2"}]


[View source]
def default : Array(Int64) | Nil #

Value by default.


[View source]
def default? : Array(Int64) | Nil | Nil #

Value by default.


[View source]
def field_type : String #

Field type - Structure Name.


[View source]
def group : UInt8 #

To optimize field traversal in the paladins/check() method.

WARNING It is recommended not to change.


[View source]
def has_value? : Bool #

Does the field value match the possible options in choices.


[View source]
def multiple? : Bool #

Specifies that multiple options can be selected at once.


[View source]
def readonly=(readonly : Bool) #

Specifies that the field cannot be modified by the user.


[View source]
def readonly? : Bool #

Specifies that the field cannot be modified by the user.


[View source]
def refrash_val_arr_i64(val : Array(Int64)) : Nil #

[View source]
def required? : Bool #

Required field.


[View source]
def value : Array(Int64) | Nil #

Sets the value of an element.


def value=(value : Array(Int64) | Nil) #

Sets the value of an element.


[View source]
def value? : Array(Int64) | Nil | Nil #

Sets the value of an element.