Jump to content

Customfields saving data


Recommended Posts

I am creating a custom field in the categories backend. The custom field is showing correctly (no problems there), but I cannot save any data to it.

 

I am using a override. Do I have to do any other creations than just adding a new array specifying the input that gonna be added like following (to renderForm) in adminCategoryController.php:


				array(
					'type' => 'text',
					'name' => 'myCustomField',
					'label' => $this->l('custom label'),
					'required' => false,
					'hint' => $this->l('custom descr'),	
				),

I have seen some examples where modifications to the database is needed, but is that required?

Normally, speaking of plugins, you dont need to do any database modifications to that custom field in a plugin. :-)

 

Edit: Ended up creating a module for this instead, since overriding isn't the smartest idea.

Edited by soduno (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...