Jump to content

Input attributes


DanielH

Recommended Posts

Trying to style formbuilder input fields to match the other forms produced by jreviews. i.e: userprofiles register form and want to remove the title and use the placeholder attribute.

 

In the sample schema below "maxLength" and input validations I've used work but not the "placeholder". How do you use placeholder?

    {
        "title": "Contacts",
        "type": "array",
        "format": "grid",
        "items": {
            "title": "Contact",
            "type": "object",
            "properties": {
                "deptTitle": {
                    "title": "Dept",
                    "type": "string",
		    "name": "Department",
		    "maxLength": 50,
                    "placeholder": "department"
                },
                "nameValue": {
                    "title": "Name",
                    "type": "string",
		    "maxLength": 36,
                    "placeholder": "name"
                },
                "phValue": {
                    "title": "Phone",
                    "type": "string",
                    "pattern": "^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$",
		    "maxLength": 14,
                    "placeholder": "phone"
                },
                "extValue": {
                    "title": "Ext",
                    "type": "string",
		    "maxLength": 5,
                    "placeholder": "extension"
                },
                "mailValue": {
                    "title": "Email",
                    "type": "string",
		    "maxLength": 45,
                    "placeholder": "email"
                }
            }
        }
    }

Reading up and every example I have found this is the format for these attributes.

 

Thank you

Daniel

Link to comment
×
×
  • Create New...