No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Question: Difference between "disable" and "readonly" in form components?

    Help
    3
    4
    30
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Mickey58 last edited by Mickey58

      What is the difference between “disable” and “readonly” in form components, like q-input, q-select, etc.?

      I’m aware of the visual differences (e.g. “disabled” icon shows at mouseover for disabled fields).

      But what other differences exist? I would expect that e.g. for a q-select, I can open the pulldown menu with options, if readonly (without ability to change the selected options), and I can’t open the options pulldown if disabled…but a short test seems like I can’t open the options pulldown in either case.

      So I’m not sure when to use one vs. the other, and why the two exist.

      W 1 Reply Last reply Reply Quote 0
      • S
        suleiman_as last edited by suleiman_as

        it mainly useful in forms,
        an input with (readonly) is just not editable, but gets sent on submit.
        while (disabled) input isn’t editable and isn’t sent on submit.

        1 Reply Last reply Reply Quote 0
        • W
          walfin @Mickey58 last edited by

          @mickey58 AFAIK, readonly text can be selected, disabled can’t.

          1 Reply Last reply Reply Quote 0
          • M
            Mickey58 last edited by

            @suleiman_as , @walfin - thanks, that’s not explained in the docs. I may open a doc PR for it.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post