Page MenuHomePhabricator

Page Forms #forminput: should recognize class= attribute
Open, LowPublic


When using twitter bottstrap (e. g. via chameleon skin) it is common practice to use |class=form-control in form elements so they get handled via bootstrap.

This is currently not possible with the #forminput parser function.

Suggested syntax:


Event Timeline

Krabina created this task.Nov 3 2017, 5:09 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 3 2017, 5:09 PM
Yaron_Koren added a comment.EditedNov 3 2017, 7:23 PM

Can't you just wrap the forminput in a div or span with its own class, and set the CSS/JS through that?

no, this doesn't work
i tried to wrap the forminput around <span class="form-control"></span>

by the way class=form-control works nicely for most elements (text, dropdown) but not well for radiobutton and not for tokens.

Right, I should have clarified - I didn't just mean adding those <div> or <span> tags, and seeing if it worked; I meant modifying the CSS or JS to also look for "span.form-control input" instead of just "input.form-control", and that kind of thing. Or is that not possible? (I don't really know what Bootstrap does.)

Yaron_Koren triaged this task as Low priority.Feb 12 2019, 3:45 AM