struct DynFork::Fields::ChoiceTextMultField
  
  - DynFork::Fields::ChoiceTextMultField
- DynFork::Fields::Field
- Struct
- Value
- Object
Overview
Type of selective field with static of elements.
NOTE With multiple choice.
NOTE How to use, see example.
Defined in:
dynfork/fields/choice_text.crConstructors
- .new(pull : JSON::PullParser)
- .new(label : String = "", default : Array(String) | Nil = nil, hide : Bool = false, required : Bool = false, disabled : Bool = false, readonly : Bool = false, ignored : Bool = false, hint : String = "", choices : Array(Tuple(String, String)) | Nil = Array(Tuple(String, String)).new)
Instance Method Summary
- 
        #choices : Array(Tuple(String, String)) | Nil
        
          Html tag: select multiple. 
- 
        #choices? : Array(Tuple(String, String)) | Nil | Nil
        
          Html tag: select multiple. 
- 
        #default : Array(String) | Nil
        
          Value by default. 
- 
        #default? : Array(String) | Nil | Nil
        
          Value by default. 
- 
        #field_type : String
        
          Field type - Structure Name. 
- 
        #group : UInt8
        
          To optimize field traversal in the paladins/check()method.
- 
        #has_value? : Bool
        
          Does the field value match the possible options in choices. 
- 
        #multiple? : Bool
        
          Specifies that multiple options can be selected at once. 
- 
        #readonly=(readonly : Bool)
        
          Specifies that the field cannot be modified by the user. 
- 
        #readonly? : Bool
        
          Specifies that the field cannot be modified by the user. 
- 
        #refrash_val_arr_str(val : Array(String)) : Nil
        
          For the DynFork::QPaladins::Tools#refrash_fieldsmethod.
- 
        #required? : Bool
        
          Required field. 
- 
        #value : Array(String) | Nil
        
          Sets the value of an element. 
- 
        #value=(value : Array(String) | Nil)
        
          Sets the value of an element. 
- 
        #value? : Array(String) | Nil | Nil
        
          Sets the value of an element. 
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 : String
    warning, 
    
  
    
      warning=(warning : String)
    warning=
    
  
    
  Constructor methods inherited from struct DynFork::Fields::Field
  
  
    
      new(pull : JSON::PullParser)
    new
    
  
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
Constructor Detail
Instance Method Detail
Html tag: select multiple.
Example: [{"value", "Title"}, {"value 2", "Title 2"}]
Html tag: select multiple.
Example: [{"value", "Title"}, {"value 2", "Title 2"}]
To optimize field traversal in the paladins/check() method.
WARNING It is recommended not to change.
For the DynFork::QPaladins::Tools#refrash_fields method.