Skip to content

Commit

Permalink
Allow for Symbols in input fields
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaensel committed Nov 6, 2022
1 parent 7bb026a commit d1949f8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/FormInputs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ julia> textfield("What's your name *", :name, name = "name", @iif(:warin), :fill
* `debounce::Union{String, Int}` - Debounce amount (in milliseconds) when updating model ex. `0` `500`
* `maxlength::Union{String, Int}` - Specify a max length of model ex. `12`
"""
function textfield( label::String = "",
function textfield( label::Union{String, Symbol} = "",
fieldname::Union{Symbol,Nothing} = nothing,
args...;
content::Union{String,Vector,Function} = "",
Expand All @@ -103,13 +103,13 @@ end
textfield(content::Union{Vector,Function},
fieldname::Union{Symbol,Nothing} = nothing,
args...;
label::String = "",
label::Union{String, Symbol} = "",
kwargs...) = textfield(label, fieldname, args...; content, kwargs...)

"""
numberfield( label::String = "", fieldname::Union{Symbol,Nothing} = nothing, args...; content::Union{String,Vector,Function} = "", kwargs...)
numberfield( label::Union{String, Symbol} = "", fieldname::Union{Symbol,Nothing} = nothing, args...; content::Union{String,Vector,Function} = "", kwargs...)
"""
function numberfield( label::String = "",
function numberfield( label::Union{String, Symbol} = "",
fieldname::Union{Symbol,Nothing} = nothing,
args...;
content::Union{String,Vector,Function} = "",
Expand All @@ -125,7 +125,7 @@ end
"""
textarea(label::String = "", fieldname::Union{Symbol,Nothing} = nothing, args...; content::Union{String,Vector,Function} = "", kwargs...)
"""
function textarea(label::String = "",
function textarea(label::Union{String, Symbol} = "",
fieldname::Union{Symbol,Nothing} = nothing,
args...;
content::Union{String,Vector,Function} = "",
Expand All @@ -134,9 +134,9 @@ function textarea(label::String = "",
end

"""
filefield( label::String = "", fieldname::Union{Symbol,Nothing} = nothing, args...; kwargs...)
filefield( label::Union{String, Symbol} = "", fieldname::Union{Symbol,Nothing} = nothing, args...; kwargs...)
"""
function filefield( label::String = "",
function filefield( label::Union{String, Symbol} = "",
fieldname::Union{Symbol,Nothing} = nothing,
args...;
kwargs...)
Expand Down

0 comments on commit d1949f8

Please sign in to comment.