1792 Posts in 588 Topics by 560 members
| Go to End | ||
| Author | Topic: | 3162 Views |
-
Re: How to take out 'Form Legend' tag

28 January 2009 at 4:17am
To come back on your legend question:
you have to do it on the form, not on the fieldset.
So I guess in your case this would become:
instead of
return new SearchForm($this, "SearchForm", $fields, $actions);
do
$form = new SearchForm($this, "SearchForm", $fields, $actions);
$form->setLegend("My Legend");return $form
Although I'm not sure which SS version you're using and if this was part of 2.2.3 already...
-
Re: How to take out 'Form Legend' tag

29 January 2009 at 9:57am
Hi Ian,
if you just want to take out the "Form legend Tag", go to directory sapphire->templates, open the "SearchForm.ss" and delete it.
regards, Andi
-
Re: How to take out 'Form Legend' tag

29 January 2009 at 3:42pm Last edited: 29 January 2009 3:42pm
andi68, editing the sapphire/ templates is often a bad idea as when you are upgrading SS, its likely to break. As for getting rid of the legend you should just be able to do this in your CSS file
form legend {
display: none;
} -
Re: How to take out 'Form Legend' tag

1 March 2009 at 10:31am Last edited: 1 March 2009 10:32am
Copy SearchForm.ss from "sapphire/templates" into "mysite/templates" (or mytheme/templates). Then remove the "<legend>Search</legend>" tag. This way there are no issues in case of framework updates.
-
Re: How to take out 'Form Legend' tag

1 May 2009 at 12:47pm
Thanks maksfeltrin, I think your solution is the best.
Willr - the CSS way does work, but I'm obsessive about my code validating with no errors and warnings.
Is that meaningless legend tag there for the future?
-
Re: How to take out 'Form Legend' tag

1 May 2009 at 1:57pm
It shouldn't be meanless - it should have some text in it at some point. Maybe I will change this for 2.4. I didn't want to add it for 2.3 as it would likely break alot of sites.
-
Re: How to take out 'Form Legend' tag

1 May 2009 at 2:54pm
No worries Will, understood - I feel a little bad about being critical because overall SilverStripe is freakin' awesome!
| 3162 Views | ||
| Go to Top |





