WordPress.org

Support

Support » Plugins and Hacks » [Resolved] field name in field

[Resolved] field name in field

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mike Challis
    Participant

    @mikechallis

    How to add a placeholder value to each input field

    For extra fields you can add them with javascript onfocus.

    Example: you have a phone field and want to show an example entry of (xxx)xxx-xxxx and when they click the field it disappears.

    On the form edit page go to the extra field you have for Phone and add a “Default value:” (xxx)xxx-xxxx
    Next, add this to the “Attributes:”
    onfocus="if(this.value=='(xxx)xxx-xxxx')this.value='';" onblur="if(this.value=='')this.value='(xxx)xxx-xxxx';"

    In the soon to be released version 4 you can do this to all fields not just extra fields

    Thanks for the reply. It is the non extra fields that I want to have this working on so I will need to wait till version 4. Hope it is going well!

    sazzadmim
    Member

    @sazzadmim

    I think you don’t have to wait for version 4. Just mark non extra fields as non required and create extra fields with same name. Easy trick. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] field name in field’ is closed to new replies.