PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Disable Textbox

  1. digitsoft
    Member

    I have tested every solution shown in the forums from these posts and none work:
    http://www.gravityhelp.com/forums/topic/make-a-readonly-field#post-7034
    http://www.gravityhelp.com/forums/topic/read-only-fields-1
    http://www.gravityhelp.com/forums/topic/terms-and-conditions-text-record-in-form-entries-database#post-25225

    I need to be able to pass a variable in the url, display it in a field, make it readonly, and store it in the db.

    I really don't know why setting a field to readonly isn't an included option...like a simple checkbox...seriously...

    Posted 12 years ago on Thursday May 31, 2012 | Permalink
  2. David Peralty

    Gravity Forms focuses on collecting user data, and as such, a form field that doesn't allow the collection of user data hasn't been a priority. You don't mention why none of these have worked for you. Can you link to your form and let me know what exactly you've done so far, and why it hasn't worked?

    Posted 12 years ago on Thursday May 31, 2012 | Permalink
  3. digitsoft
    Member

    Hey David...

    I get that it's about collecting info, but it seems like a simple thing to add and there have been plenty of people interested.

    If I knew why it hasn't worked, I could've fixed it ;) The short answer is this - any field I try to disable still allows editing. Even the source shows that the css is set to disabled, but the fields remain unchanged.

    Unfortunately I can't post a link to it publicly, but here's what I tried:
    1. Adding the filters (1 at a time) to the theme's function file and setting the input field's css to readonly or disabled (whatever the filter called for)

    2. Followed another David's post here: http://www.gravityhelp.com/forums/topic/make-a-readonly-field#post-7034

    I'll keep working on a solution, but any ideas as to how to disable a field would be helpful.

    Thanks...

    Rob

    Posted 12 years ago on Thursday May 31, 2012 | Permalink
  4. David Peralty

    What about a blank HTML field that you then pre-populate with whatever information you want? Would that be a workable solution for you? HTML fields by default aren't input fields and are for display only.

    Posted 12 years ago on Thursday May 31, 2012 | Permalink
  5. digitsoft
    Member

    It needs to be dynamic - I need to display a variable that's passed in the url AND save it to the database.

    I just gave up trying to do it easily...added a hidden field that's self populated from the post and grabbed that info in the page directly via php so I could display it too.

    I still think there's a use for having a field type that allows text to be passed and saved in the db without allowing users the ability to edit it.

    Here's what we had to accomplish:
    1. Pass a member id via url
    2. Add text to the beginning of it
    3. Display it on screen
    4. Save that same info to the db

    URL sent: http://gravityhelp.com/?ref=123456

    Form:
    Please either call 888-888-8888 and provide them with your customer number: MYID123456 or fill out the form below.

    (field with admin view only) - stores 123456 in the db

    Posted 12 years ago on Friday June 1, 2012 | Permalink
  6. David Peralty

    I will pass your note on to the developers. Glad you were able to find an acceptable workaround.

    Posted 12 years ago on Friday June 1, 2012 | Permalink

This topic has been resolved and has been closed to new replies.