Comments (6)
You can already use the API to do that, like:
<?php
$form->getField("something")->setAttribute("someAttr", "value");
Is it alright?
from formidable.
Ok for the placeholder, but if it's the title of an <a>
element for instance, we can't select if via this method, can we?
But maybe the solution would rather be to use a separate template engine that does this work, but it we follow that policy, it would mean removing the <custom source="" />
that does the same work, of what I can see.
from formidable.
Maybe we should remove the <custom .../>
and use another syntax for placeholders, that would be useable anyway excepted in the fields, like %placeholder%
or {placeholder}
from formidable.
Jinja-like {{ placeholder }}
would be the best, because it avoid collisition with JS code or other things
from formidable.
It sounds good to me.
from formidable.
This is done, you can now define placeholders anyway with {{ something }}
and populate it with $form->setPlaceholder('something', 'value');
from formidable.
Related Issues (20)
- Many constraints validation per fields HOT 9
- MulticheckboxField getValue and setValue are incompatible. HOT 2
- No phpunit specified in composer HOT 3
- Include composer.lock file HOT 3
- <select><option ... is not processed correctly HOT 7
- lazy parse HOT 3
- Option to return callback result from handle() HOT 1
- Support for input type button HOT 3
- Use of 'source=""' for select in 'multiple' doesn't work HOT 2
- Render of 'date' input is incorrect HOT 3
- Date field doesn't processing default value
- Add support for additional input types
- minlength attribute is not output in HTML HOT 1
- Regex should output HTML "pattern" attribute on inputs HOT 2
- input type checkbox generating value attribute twice
- Attributes with single quotes not working in form HOT 9
- <select> elements lose the "required" HTML attribute after parsing
- Use the same placeholder multiple times HOT 2
- Use the same source multiple times HOT 2
- Input type="number" constraint validation
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 formidable.