GithubHelp home page GithubHelp logo

need readonly attribute about depage-forms HOT 2 OPEN

depage avatar depage commented on September 4, 2024
need readonly attribute

from depage-forms.

Comments (2)

jonasjonas avatar jonasjonas commented on September 4, 2024

The problem with the readonly attribute is, that we cannot make sure, that the user does not change the value (by removing the attribute or changing its value directly). So to make readonly work as intended, the input in depage-forms should then also be readonly, e.g. not get its data from the POST.

The question is:
What do you need the only attribute for. If you just want to display data, just use the addHtml-method, its safer and no data will be submitted.

The only sense of the readonly-attribute for me is as a user-hint, usually set with javascript, when an action or a data entry is not available yet.

So when we implemented depage-forms, Sebastian asked we about the attribute and I told him to leave it out (for the time being).

What would be your use-case?

from depage-forms.

bwl21 avatar bwl21 commented on September 4, 2024

hi,

our uscase is, that we do a course registration form, where the course data is provided by the website and should not be changed by the visitor. On the other hand the subsequent processing shold also get the course data as regular form fields.

A third usecase is, that the form is invoked without a course known (maybye the curse is for what ever reason notnnounced by the website but on other channels.) In this case the user should be able to fill the fields.

Also the information should be presented the same way regardelss if prefilled or filled by the user. This would be much effort e.g. with checkboxers etc.

But the major thing is, that our subsequent processing should expose the fields as any other form information.

In any case the form visualization and subsequent processing would be the same all the time. Also our formsdriver only needs to set the attribute but not to emit entirely different elements.

This cannot be achieved with html text ( whcih has no value). Isn't there readonly attribute in HTML4 which could be used for this.?

It would be sufficient (but maybe even more difficult) if a fieldset can be set to readonly.

I hope the clarifies our usecase.

Thanks for asking.

-b

from depage-forms.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.