Comments (2)
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.
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)
- add aria roles to form elements
- how can I make fields mandatory depending on another value HOT 2
- will depage-forms work with php 7 HOT 2
- Get a Fatal Error when pushing the submit button. HOT 4
- Need support to provide an array with the form labels and fieldvalues HOT 1
- Need support for data confirmation page HOT 2
- depage appears to be vulnerable HOT 1
- add confirm-element to steps
- '0' is not an allowed input value for a number HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from depage-forms.