Properties Reference

This page provides detailed explanations of all properties available in md2form. The available properties vary depending on the question type.

Common Properties

Properties that can be used with all question types.

type

Required Property

Specifies the type of question.

#type short_text

Available values:

  • short_text, long_text, number, email, phone
  • dropdown, radio, checkbox
  • date, time
  • rating, likert, matrix, scale
  • file_upload, signature
  • image, video
  • boolean, section_header

required

Specifies whether an answer to the question is mandatory.

#required true
#required false

Default value: false

Applicable question types: All (except section_header, image, video)

visible

Controls whether the question is displayed or hidden.

#visible true
#visible false

Default value: true

Applicable question types: All

Text Input Properties

placeholder

Specifies placeholder text to display in the input field.

#placeholder "John Doe"
#placeholder "Enter text here"

Applicable question types: short_text, long_text, number, email, phone

maxLength

Specifies the maximum number of characters that can be entered.

#maxLength 100
#maxLength 500

Applicable question types: short_text, long_text

default

Specifies the default value.

#default "Default text"
#default 25

Applicable question types: short_text, long_text, number, email, phone, selection types

Numeric Input Properties

min

Specifies the minimum value that can be entered.

#min 0
#min -100

Applicable question types: number, scale

max

Specifies the maximum value that can be entered.

#max 120
#max 100

Applicable question types: number, scale

step

Specifies the increment for numeric values.

#step 1
#step 0.5
#step 5

Applicable question types: number, scale

integerOnly

Specifies whether to allow only integer input.

#integerOnly true
#integerOnly false

Default value: false

Applicable question types: number

Selection Properties

options

Specifies a list of choices. Multiple choices can be specified as comma-separated values.

#options "Choice 1","Choice 2","Choice 3"
#options "Tokyo","Osaka","Nagoya"

Applicable question types: dropdown, radio, checkbox

allowOther

Specifies whether to add an “Other” choice.

#allowOther true
#allowOther false

Default value: false

Applicable question types: dropdown, radio

searchable

Specifies whether to enable search functionality in the dropdown.

#searchable true
#searchable false

Default value: false

Applicable question types: dropdown

minSelected

Specifies the minimum number of selections for checkboxes.

#minSelected 1
#minSelected 2

Applicable question types: checkbox

maxSelected

Specifies the maximum number of selections for checkboxes.

#maxSelected 3
#maxSelected 5

Applicable question types: checkbox

Date/Time Properties

includeTime

Specifies whether to include time in date selection.

#includeTime true
#includeTime false

Default value: false

Applicable question types: date

minDate

Specifies the minimum selectable date in ISO format.

#minDate "2024-01-01"
#minDate "1900-01-01"

Applicable question types: date

maxDate

Specifies the maximum selectable date in ISO format.

#maxDate "2024-12-31"
#maxDate "2030-12-31"

Applicable question types: date

minTime

Specifies the minimum selectable time in “HH:MM” format.

#minTime "09:00"
#minTime "08:30"

Applicable question types: time

maxTime

Specifies the maximum selectable time in “HH:MM” format.

#maxTime "18:00"
#maxTime "22:30"

Applicable question types: time

stepMinutes

Specifies the increment for time selection in minutes.

#stepMinutes 15
#stepMinutes 30
#stepMinutes 60

Default value: 15

Applicable question types: time

Rating/Scale Properties

scale

Specifies the number of rating levels.

#scale 5
#scale 10

Default value: 5

Applicable question types: rating

labels

Specifies labels for the lowest and highest ratings.

#labels "Dissatisfied","Very satisfied"
#labels "Low","High"

Applicable question types: rating

icon

Specifies the icon used for ratings.

#icon star
#icon heart
#icon circle

Default value: star

Applicable question types: rating

statements

Specifies the rating items (rows) for a Likert scale.

#statements "Item 1","Item 2","Item 3"
#statements "Product quality","Price fairness","Staff service"

Applicable question types: likert

scaleLabels

Specifies the rating scale labels (columns) for a Likert scale.

#scaleLabels "Strongly Disagree","Disagree","Neutral","Agree","Strongly Agree"
#scaleLabels "Poor","Somewhat Poor","Average","Good","Excellent"

Applicable question types: likert

requiredPerStatement

Specifies whether rating each item in a Likert scale is mandatory.

#requiredPerStatement true
#requiredPerStatement false

Default value: false

Applicable question types: likert

rows

Specifies row labels for a matrix.

#rows "Monday","Tuesday","Wednesday","Thursday","Friday"
#rows "Product A","Product B","Product C"

Applicable question types: matrix

columns

Specifies column labels for a matrix.

#columns "Morning","Afternoon","Evening"
#columns "Satisfied","Neutral","Dissatisfied"

Applicable question types: matrix

cellType

Specifies the cell type for a matrix.

#cellType radio
#cellType checkbox
#cellType number
#cellType short_text

Default value: radio

Applicable question types: matrix

requiredPerRow

Specifies whether filling in each row of a matrix is mandatory.

#requiredPerRow true
#requiredPerRow false

Default value: false

Applicable question types: matrix

minLabel

Specifies the label for the minimum value of a scale.

#minLabel "Beginner"
#minLabel "Low"

Applicable question types: scale

maxLabel

Specifies the label for the maximum value of a scale.

#maxLabel "Advanced"
#maxLabel "High"

Applicable question types: scale

File/Signature Properties

allowedTypes

Specifies the file formats that can be uploaded.

#allowedTypes "pdf","docx","jpg","png"
#allowedTypes "pdf","doc"

Applicable question types: file_upload

maxFiles

Specifies the maximum number of files that can be uploaded.

#maxFiles 1
#maxFiles 5

Default value: 1

Applicable question types: file_upload

maxSizeMB

Specifies the maximum file size that can be uploaded in MB.

#maxSizeMB 10
#maxSizeMB 50

Default value: 10

Applicable question types: file_upload

captureMode

Specifies the method for capturing signatures.

#captureMode draw
#captureMode type
#captureMode upload

Default value: draw

Applicable question types: signature

Media Properties

src

Specifies the URL for images or videos.

#src "https://example.com/image.jpg"
#src "https://example.com/video.mp4"

Applicable question types: image, video

alt

Specifies alternative text for images.

#alt "Product photo"
#alt "Instruction diagram"

Applicable question types: image

width

Specifies the width of media.

#width 300
#width auto

Applicable question types: image, video

height

Specifies the height of media.

#height 200
#height auto

Applicable question types: image, video

caption

Specifies a caption for media.

#caption "Product image"
#caption "Service explanation video"

Applicable question types: image, video

Other Properties

onLabel

Specifies the label for the True (on) state of a boolean type.

#onLabel "Yes"
#onLabel "Prefer to receive"

Default value: "Yes"

Applicable question types: boolean

offLabel

Specifies the label for the False (off) state of a boolean type.

#offLabel "No"
#offLabel "Prefer not to receive"

Default value: "No"

Applicable question types: boolean

title

Specifies the main title for a section header.

#title "Important Information"
#title "About Personal Information Handling"

Applicable question types: section_header

subtitle

Specifies the subtitle for a section header.

#subtitle "Please read the following information carefully"
#subtitle "This is a required section"

Applicable question types: section_header

Special Property Notation

Specifying Array Values

Multiple values are specified as comma-separated. If a value contains a comma, escape it appropriately.

# Basic array
 
#options "Choice 1","Choice 2","Choice 3"
 
# When value contains comma
 
#options "Tokyo, Capital region","Osaka, Kansai region","Nagoya, Chubu region"

Specifying Label Pairs

When specifying two values as a pair (e.g., labels):

#labels "Minimum","Maximum"
#labels "Dissatisfied","Satisfied"

Important Notes on Property Usage

1. Property Name Case

Property names should be consistently lowercase:

# ❌ Incorrect
 
#Type short_text
#Required true
#MaxLength 100
 
# ✅ Correct
 
#type short_text
#required true
#maxLength 100

2. Using Quotes

String values must always be enclosed in double quotes:

# ❌ Incorrect
 
#placeholder Enter text
#options Choice1,Choice2
 
# ✅ Correct
 
#placeholder "Enter text"
#options "Choice1","Choice2"

3. Specifying Boolean Values

Boolean values should be specified as true or false:

# ❌ Incorrect
 
#required yes
#visible 1
 
# ✅ Correct
 
#required true
#visible false

4. Specifying Numeric Values

Numeric values should contain only digits (no quotes needed):

# ❌ Incorrect
 
#min "0"
#max "100"
 
# ✅ Correct
 
#min 0
#max 100

5. Unsupported Properties

Properties not supported by a question type are ignored. For example:

### Number Input
 
#type number
#placeholder "Enter number" # Valid
#options "1","2","3" # Ignored (options not supported for number type)

Property Priority

When the same property is specified multiple times, the last specification takes precedence:

### Question
 
#type short_text
#required false
#required true # This value is used

Question Type Property Support Table

Propertyshort_textlong_textnumberemailphonedropdownradiocheckboxdatetimeratinglikertmatrixscalefile_uploadsignatureimagevideobooleansection_header
required---
visible
placeholder---------------
maxLength------------------
default-------

(Other properties can also be checked in the support table similarly)

Next Steps

After understanding properties, check the following pages for more detailed information: