Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-09-09 08:51:21
- userAnterface
- Member
- Registered: 2007-09-07
- Posts: 16
Assigning classes to form input elements
How do I assign a class to <txp:comment_name_input /> ?
Offline
Re: Assigning classes to form input elements
Surround it with a span/div that has the desired class. Or just set a generic style for the INPUT tag.
Last edited by ruud (2007-09-09 09:48:05)
Offline
#3 2007-09-09 09:37:24
- userAnterface
- Member
- Registered: 2007-09-07
- Posts: 16
Re: Assigning classes to form input elements
Using/span sounds inefficient. A generic style would affect buttons too, I am looking to make some width adjustments. Is there no way to assign a class directly to input?
Offline
Re: Assigning classes to form input elements
They already have classes by default.
Offline
#5 2007-09-09 10:00:13
- userAnterface
- Member
- Registered: 2007-09-07
- Posts: 16
Re: Assigning classes to form input elements
I tried <txp:comment_name_input class=“mc” /> but I am getting
Tag error: <txp:comment_name_input class=“mc” /> -> Textpattern Warning: tag does not exist on line 973
Could your hint me on how to modify the class values if they already have by default?
Offline
Re: Assigning classes to form input elements
The only way to modify them is by hacking the TXP code (textpattern/publish/comments.php). This is not recommended, as it makes it difficult to upgrade.
Why can’t you use the default classes the input elements have. They should be unique enough to style properly.
Offline