[pmwiki-users] adding a class to a form
Brian Tibbels
brian.tibbels at clickmarlow.co.uk
Mon Nov 11 01:32:30 CST 2013
Many thanks Petko - how feasible is it to allow any attribute regardless,
in the way that html tags work so that any attribute can be added to any
tag?
Brian
*Brian Tibbels*
*IT support for small business and the individual*
http://clickmarlow.co.uk/
*m*: 07804 109906* | t*: 01628 477640
On 11 November 2013 06:00, Petko Yotov <5ko at 5ko.fr> wrote:
> Brian Tibbels writes:
>
>> In attempting to build a site in Bootstrap3 and I am trying to add/insert
>> :
>>
>> class="form-horizontal" role="form"
>>
>> to (:input auth_form :)
>>
>
> The (:input auth_form:) markup does not allow custom attributes up to
> version 2.2.57, but I enabled them in Subversion so this will be easier in
> the next verison.
>
> In config.php, first we enable the role attribute:
>
> $PostConfig[create_function('$pn','$GLOBALS["InputAttrs"][]=
> "role";')]=100;
>
>
> Then we redefine the auth_form markup (not needed in 2.2.58 and later):
>
> $InputTags['auth_form'] = array(
> ':html' => "<form \$InputFormArgs>\$PostVars",
> 'action' => str_replace("'", '%37', stripmagic($_SERVER['REQUEST_
> URI'])),
> 'method' => 'post',
> 'name' => 'authform');
>
>
> Then, in the wiki page (eg. Site.AuthForm) we use:
>
> (:input auth_form class="form-horizontal" role="form":)
>
> Petko
>
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20131111/b7f58da4/attachment.html>
More information about the pmwiki-users
mailing list