Page MenuHomePhabricator

Page Forms #forminput: should recognize class= attribute
Closed, DeclinedPublic

Description

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

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.)

Aklapper added a subscriber: Yaron_Koren.

This task has been assigned to the same task owner for more than two years. Resetting task assignee due to inactivity, to decrease task cookie-licking and to get a slightly more realistic overview of plans. Please feel free to assign this task to yourself again if you still realistically work or plan to work on this task - it would be welcome!

For tips how to manage individual work in Phabricator (noisy notifications, lists of task, etc.), see https://phabricator.wikimedia.org/T228575#6237124 for available options.
(For the records, two emails were sent to assignee addresses before resetting assignees. See T228575 for more info and for potential feedback. Thanks!)