struct DynFork::Fields::TextField
  
  - DynFork::Fields::TextField
 - DynFork::Fields::Field
 - Struct
 - Value
 - Object
 
Overview
A field for entering a text string.
Defined in:
dynfork/fields/text.crConstructors
- .new(pull : JSON::PullParser)
 - .new(label : String = "", default : String | Nil = nil, placeholder : String = "", maxlength : UInt32 | Nil = 256, regex : String | Nil = nil, regex_err_msg : String | Nil = nil, hide : Bool = false, unique : Bool = false, textarea : Bool = false, use_editor : Bool = false, required : Bool = false, disabled : Bool = false, readonly : Bool = false, ignored : Bool = false, hint : String = "", warning : Array(String) = Array(String).new)
 
Instance Method Summary
- 
        #default : String | Nil
        
          
Value by default.
 - 
        #default? : String | Nil | Nil
        
          
Value by default.
 - 
        #field_type : String
        
          
Field type - Structure Name.
 - 
        #group : UInt8
        
          
To optimize field traversal in the
paladins/check()method. - 
        #input_type : String | Nil
        
          
Html tag: input type="text".
 - 
        #input_type? : String | Nil | Nil
        
          
Html tag: input type="text".
 - 
        #maxlength : UInt32 | Nil
        
          
The maximum number of characters allowed in the text.
 - 
        #maxlength? : UInt32 | Nil | Nil
        
          
The maximum number of characters allowed in the text.
 - 
        #minlength : UInt32 | Nil
        
          
The minimum number of characters allowed in the text.
 - 
        #minlength? : UInt32 | Nil | Nil
        
          
The minimum number of characters allowed in the text.
 - 
        #placeholder : String
        
          
Displays prompt text.
 - 
        #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_str(val : String) : Nil
        
          
For the
DynFork::QPaladins::Tools#refrash_fieldsmethod. - 
        #regex : String | Nil
        
          
Regular expression to validate the
#value. - 
        #regex? : String | Nil | Nil
        
          
Regular expression to validate the
#value. - 
        #regex_err_msg : String | Nil
        
          
Error message.
 - 
        #regex_err_msg? : String | Nil | Nil
        
          
Error message.
 - 
        #required? : Bool
        
          
Required field.
 - 
        #textarea? : Bool
        
          
For Html textarea.
 - 
        #unique? : Bool
        
          
The unique value of a field in a collection.
 - 
        #use_editor? : Bool
        
          
Whether or not to use your preferred text editor - CKEditor, TinyMCE, etc.
 - 
        #value : String | Nil
        
          
Sets the value of an element.
 - 
        #value=(value : String | Nil)
        
          
Sets the value of an element.
 - 
        #value? : 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 : Array(String)
    warning, 
    
  
    
      warning=(warning : Array(String))
    warning=
    
  
    
  Constructor methods inherited from struct DynFork::Fields::Field
  
  
    
      new(pull : JSON::PullParser)
    new
    
  
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
Constructor Detail
Instance Method Detail
To optimize field traversal in the paladins/check() method.
WARNING It is recommended not to change.
Regular expression to validate the #value.
NOTE Example: "^[a-zA-Z0-9_]+$"
Regular expression to validate the #value.
NOTE Example: "^[a-zA-Z0-9_]+$"
Error message.
NOTE Example: I18n.t("allowed_chars.interpolation",chars: "a-z, A-Z, 0-9, _")
Error message.
NOTE Example: I18n.t("allowed_chars.interpolation",chars: "a-z, A-Z, 0-9, _")