Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-03-06 10:21:05

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,536
Website GitHub Twitter

checkbox function havent a css implemented

Hi

the checkbox function into textpattern is not implementing a mechanism to set a class, the class is always “checkbox”, mays adding the ability to choose a class could be a good idea.

Is dev can add that to their todo?

Thanks

Offline

#2 2013-03-06 10:38:18

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: checkbox function havent a css implemented

I don’t think we will add any (or many) new individual attribute arguments to any of admin-side template functions, but slowly move everything to the argument lists where possible for the optional attributes, so that everything works consistently. Currently all the functions offer different set of options which is not ideal.

That said, if you do need an HTML element with a custom attribute list and a specialized function doesn’t offer it for you, you can freely use the general tags such as tag(), tag_void(), tag_start() and tag_end(). Number of other functions also provide $atts argument option (attribute list). E.g.

echo tag_void('input', array(
	'type'     => 'checkbox',
	'name'     => 'abc_checkbox',
	'value'    => 'value',
	'checked'  => true,
	'class'    => 'abc_my_class',
));

Last edited by Gocom (2013-03-06 10:41:16)

Offline

#3 2013-03-06 11:00:43

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,536
Website GitHub Twitter

Re: checkbox function havent a css implemented

Thanks Jukka for clarification.

Offline

Board footer

Powered by FluxBB