Jump to content
DanielH

Input attributes

Recommended Posts

DanielH

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

Share this post


Link to post
Alejandro

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Share this post


Link to post
DanielH

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Share this post


Link to post
Alejandro

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Share this post


Link to post
DanielH

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Edited by DanielH

Share this post


Link to post

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Please refer to our Privacy Policy.