Skip to main content
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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?
Was my question clear enough? all always tend to leave an important piece of information off :-)
If I understand your question correctly, you might have a look here:
Look for removeFieldFromTab() and removeByName()
Hope this helps...
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" ?
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?