Re: Inquiry
| From: | Brett Bieber | Date: | Mon, 19 Dec 2005 20:38:56 +0000 |
| Subject: | Re: Inquiry | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22313@lists.php.net to get a copy of this message | ||
Hey Charles,
On 12/19/05, Charles Ross <chivalry@mac.com> wrote:
>
> I'm a fairly newbie user to PHP. Most of my development experience is
> with FileMaker, and I'm currently building a web site with a
> FileMaker back end that uses FX.php to interface with the database.
> Someone on the FX.php mailing list, in response to a question I had,
> suggested that I check out the HTML_QuickForm module of PEAR, which
> I've installed on my machine. I've gone through the tutorials at the
> PEAR web site and at http://www.thelinuxconsultancy.co.uk/
> quickform.php, both of which were helpful. However, I still have
> questions, and my first one is whether this is the proper place to
> ask them. If not, can anyone recommend a more appropriate forum for
> these questions and others that are sure to arise?
>
> If so, could someone help me understand if the following is possible?
>
> When adding rules that require some elements to be filled in, is it
> possible to either remove the asterisk that accompanies the fields or
> to change the color used?
>
> I don't see how to get rid of the gray background for the header. My
> stylesheet has the following definition:
>
> .form_title
> {
> font-size: large;
> font-weight: bold;
> background-color: #990000;
> }
>
> I'm adding the header with the following line of code:
>
> $form->addElement('header', 'Header', 'Login',
> 'class=form_title');
>
> Yet the form's header retains the gray background. I could get around
> this, of course, by foregoing the header element and inserting the
> header manually, but I'm wondering if I'm missing something.
The default renderer uses inline css to style the headers. You can get
around it quickly by doing something simple like this:
$renderer =&$form->defaultRenderer();
$renderer->setHeaderTemplate("\n\t<tr>\n\t\t<td class="form_title"
align=\"left\" valign=\"top\"
colspan=\"2\"><b>{header}</b></td>\n\t</tr>");
Which will change the template used for the default renderer. There's a lot
more you can do with the renderers, but that simple example should open a
few doors for you. The documentation has the details on rendering usage:
http://pear.php.net/manual/en/package.html.html-quickform.php#package.html.html-quickform.output
Thanks,
> Chuck
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
-Brett
http:saltybeagle.com aim:ianswerq