17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2348 Views |
-
Hiding or renaming generic form fields in the CMS

29 January 2008 at 4:24am
Hiya,
Just trying to tidy up a page type I have which holds products, and thought it would be good if I could remove some of the forms and rename the generic 'Page Name' field to 'Product Name' on the cms.
What would be the best way to accomplish this?
Many Thanks
John Cleveley -
Re: Hiding or renaming generic form fields in the CMS

31 January 2008 at 2:27am
Was my question clear enough? all always tend to leave an important piece of information off
John
-
Re: Hiding or renaming generic form fields in the CMS

31 January 2008 at 1:20pm
If I understand your question correctly, you might have a look here:
http://doc.silverstripe.com/doku.php?id=page-types&s=removebyname
and here:
http://doc.silverstripe.com/doku.php?id=form&s=removebyname
Look for removeFieldFromTab() and removeByName()
Hope this helps...
-
Re: Hiding or renaming generic form fields in the CMS

31 January 2008 at 11:05pm
Thanks mate that works great for removing form elements
Is there anyway to rename the label of inherited forms?
e.g. change the inherited "Page name" form label to "Product name" ?
-
Re: Hiding or renaming generic form fields in the CMS

21 October 2008 at 8:18am
Here's how I went about "renaming" the "Page name" field:
$fields->removeFieldFromTab('Root.Content.Main', 'Page name');
$fields->addFieldToTab('Root.Content.Main', new TextField('Title', 'Product name'));
This seems to be functioning correctly. Could someone with more experience let us know if this is good practise?
| 2348 Views | ||
|
Page:
1
|
Go to Top |

