WordPress.org

Ready to get started?Download WordPress

Forums

Form Manager
Disable Field (3 posts)

  1. aschott
    Member
    Posted 5 months ago #

    I'm looking for a way to disable a text input field. I have datepicker instantiated on this field when javascript is in use, but if a visitor is not allowing javascript I need to have the field disabled to force them to call the office instead of letting them type in any date they wish.

    Any ideas are appreciated.

    http://wordpress.org/plugins/wordpress-form-manager/

  2. Samatva
    Member
    Posted 5 months ago #

    PHP scripts have a hard time telling if JavaScript is disabled. The way to do it is to insert a disabled field and enable it with JavaScript (embedded in a 'Note' field).

    You could set a 'Note' field with HTML enabled containing <noscript>Please call the office...</noscript>

    Sometimes, you just have to hope the person can follow instructions!

  3. aschott
    Member
    Posted 5 months ago #

    That's a great idea; I never considered embedding fields or JS in a note field. After talking more with the folks upstairs though I might just have to disable the whole form if they don't have JS; use JS to display:block or something I guess.

    Thanks for the reply Samatva, if nothing else that's a great possibility to keep in mind. Heh, if only they could follow instructions - wouldn't be posting in the first place! :)

Reply

You must log in to post.

About this Plugin

About this Topic