Multipart

Modified on Thu, Feb 15, 2018 at 8:43 AM

MULTIPART Control - Blocks UI Control

Command Name

multipart

Syntax

 [controltype options][controltype options].....

 controltype

 controltype can be one of the following:

  •  textbox
  • numeric
  • date
  • regex
  • dropdown
  • separator

 NOTE: If none of the above exists then separator is assumed

textbox
Shows a standard Textbox control
numeric
Shows a special Textbox that accepts numbers only
date
Shows a special Textbox that accepts dates only according to a provided format
regex
Shows a standard Textbox control with regular expression validation
dropdown
Shows a standard Dropdown List control
separator
Displays HTML on the screen

 NOTE: A space is required after the control type name

options

options are different for each control type.

NOTE: Any value that contains a space should be surrounded by ""

 
Available to: textbox, numeric, date, regex and dropdown
width
Width of the control in pixels (width=200)
value or defaultvalue
default value for the textbox or separated list for dropdown surrounded by "". Values separated by semi colon ;
backcolor
Back color of the control, the value should be a valid web color name or hex representation (e.g. #FF0000 or red)
prefix
text to print before the control text. Blocks can be embedded using the curly braces {}
postfix
text to print after the control text. Blocks can be embedded using the curly braces {}
mandatory
used to force entry for a text box
empty
message that appears when control is empty
error
message that appears on error (Data entry error)
maxlength
Maximum number of characters allowed
format
Valid ePower Blocks format (us phone, dash phone,...)
shape
Valid ePower Blocks shape (caps, small, smallcaps,...)
 
 
 
Available to: numeric  textbox
decimal
from 0 up number of decimal digits (decimal=2)
min
minimum value (min=0)
max
maximum value (max=100)
 
 
 
Available to: date textbox
dateformat
forces the text box to accept date in the supplied format
 
 
 
Available to: regex textbox
regex
any valid regular expression
 
 
 
Available to: dropdown only
text
if specified then the dropdown will allow user entry. Only the Text portion of the default value will be recognized if this option exists, that is, the value part will be ignored.
dropdown control's default value is specified within the list using the :::: separator as in
value="Red::::Red;Green::::::::Default;Blue"
Green is the default value.
 active (new)
 The result of the multipart returns empty string if Active is set to true in any textbox or dropdown if their individual values are empty. Default is false.
class (new)
Css class applied to dropdown or textbox controls
 
Available to: separator
 
HTML tags and text. Separator keyword can be omitted

 Note: A Maximum of 5 TextBoxes, 3 Dropdowns and 9 separators (5+3+1) can be added

The value to the control can be placed in a text file and accessed externally using the ~/Storage/... syntax                 

The separator control will only show on the screen and is not be printed. The actual data entry by the user as well as the prefix and postfix values will to be printed to the PDF document.

 EXAMPLES

 [textbox width=200 defaultvalue="Enter Text Here" backcolor=White mandatory]

 The above draws a textbox control of 200pixels width and a default value of 'Enter Text Here', a white background. The keyword mandatory (or mandatory=true) indicates that the user cannot leave the textbox empty.

 [numeric width=60 defaultvalue=1 decimal=0 min=1 max=10]

 The above draws a numeric only textbox control of 60pixels width and a default value of '1'. A minimum value of 1 and a maximum value of 10 with no decimals.

 [date width=100 dateformat="MM/dd/yyyy" mandatory]

 The above draws a textbox control of 100pixels width that allows dates to be entered in the format supplied (MM/dd/yyyy). The textbox is also set to mandatory.

 [regex regex="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" width=200]

 The above draws a textbox control of 200pixels width that allows a certain format to entered. The above regular expression can be used to force and Email structure.

[separator <span style='color: red;'>Name</span>]

or

[<span style='color: red;'>Name</span>]

 The above displays the word Name in red on the screen

[separator <span style='color: red;'>Name </span>]

[textbox width=200 prefix="Your Name is " postfix="."]

 [separator <span style='color: red;'>Number </span>]

[numeric width=50 prefix=" You selected " min=1 max=10]

 The above displays the word Name in red followed by a textbox then the word Number followed by a smaller textbox. The printout would be:

Your Name is John. You selected 5

[dropdown values="Text1::::value1;Text2::::value2"]

The above displays a dropdown list showing two options: Text1 and Text2. Depending on the selected option, the application will print either value1 or value2.

[dropdown values="Red;Green;Blue" text=Green]

Specifying a text parameter will change the behaviour of the dropdown list. It will accept user entry as well as dropdown selection. The value part of the dropdown will be ignored in this mode.

 Advanced Examples

[separator <span style='color: blue;'>Name </span>]

[textbox width=200 postfix="<nextline>{Title}"]

 Block names can be embedded inside the prefix and postfix parameters. The above will print Name followed by the Title (entered separately ) on a new line.

 [<div style='padding: 2px 2px 2px 2px;background-color: LightGray;'>Title ]

[dropdown width=100 values="Mr.;Ms.;Mrs.::::::::default;Miss" backcolor=yellow prefix="Dear " text]

[&nbsp;Name]

[textbox width=100 empty="Enter name here" mandatory prefix=" " postfix=",<nextline>your number is "]

[<p style='background-color:lightyellow;'>&nbsp;&nbsp;&nbsp;Number&nbsp;]

[numeric width=50 min=1 max=100 defaultvalue=10 empty="number please!"error="wrong!" mandatory]

[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Date&nbsp;]

[date width=80 defaultvalue="12/12/2012" dateformat=MM/dd/yyyy empty="enterdate here!!" error="Date Error" prefix="<nextline>Date Required is "postfix="<nextline>Email: "]           

[</p>&nbsp;&nbsp;&nbsp;Email&nbsp;]

[regex width=200 regex="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"error="no match"]

[<br/><br/></div>]

-----------------

Bootstrap Examples:

Bootstrap Example

 

[<div class="col-sm-4">Select Phone</div><div class="col-sm-8">]

  [dropdown width=100 values="Fax;Cell" class="form-control"]

[</div><div class="col-sm-4">Number</div><div class="col-sm-4"> ]

  [textbox width=100 mandatory ShowErrorMessage active=true prefix=": " ErrorMessage="Name is Required!" EmptyMessage="Enter Number Prefix"  class="form-control"]

[</div><div class="col-sm-4">]

  [numeric width=50 min=10 max=100 ShowError ErrorMessage="min 10 -max 100" class="form-control"][</div><div class="col-sm-12">]

  [date ErrorMessage="Date!" required]

[</div><div class="clearfix"> This is a div </div>]


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article