Page MenuHomePhabricator

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

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:

{{#forminput:form=XY|class=form-control}}

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
Aklapper removed Yaron_Koren as the assignee of this task.Jun 19 2020, 4:27 PM
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!)

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptJun 19 2020, 4:27 PM