Textbox(placeholder="", min_len=0, max_len=256, rows=1, regex=".*")

Example

from mirmod.controls import Textbox

@wob.receiver("value", "input", control=Textbox(placeholder="a,b,c,..."))
def receive_input(self, i):
  self.values = i.split(',')

Parameters

NameTypeDescription
placeholderstringShows a greyed out text that will disappear when new text is entered
min_lenintAn error will be shown if less than min_len characters are entered. Default 0
max_lenintAn error will be shown if more than max_len characters are entered. Default 1024.
rowsintIf more than one a resizable text area will be rendered.
regexstringIf input doesn’t match regex then an error will be shown.

note

The textbox will always return a string as value. So if numbers or JSON is expected it must be transformed at the receiver or during execution.