Jump to content

Changing a textbox to a textarea


Emil Eriksen

Recommended Posts

Hi,

 

I'm trying to change the "Transit time"-textbox in the carrier creation wizard to a textarea using overrides. The files I'm working with are "AdminCarrierWizardController.php" and "Carrier.php". So far I've managed to change the textbox to a textarea with the visual editor but the issue is that my input isn't saved. If i change the text from "x" to "xx" nothing happens and transit time still shows as "x". I've made the following changes to AdminCarrierWizardController.php:

From

					array(
						'type' => 'text',
						'label' => $this->l('Transit time:'),
						'name' => 'delay',
						'lang' => true,
						'required' => true,
						'size' => 41,
						'maxlength' => 128,
						'desc' => $this->l('Estimated delivery time will be displayed during checkout.')
					),
To

					array(
						'type' => 'textarea',
						'label' => $this->l('Transit time:'),
						'name' => 'delay',
						'autoload_rte' => true,
						'lang' => true,
						'rows' => 5,
						'cols' => 40,
						'required' => true,
						'size' => 41,
						'desc' => $this->l('Estimated delivery time will be displayed during checkout.')
					),
I've made the following changes to Carrier.php:

From

			/* Lang fields */
			'delay' => 					array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 128),
To

			/* Lang fields */
			'delay' => 					array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true),
Edited by Emil Eriksen (see edit history)
Link to comment
Share on other sites

changed field from text to textarea

array(
'type' => 'textarea',
'label' => $this->l('Transit time:'),
'name' => 'delay',
'lang' => true,
'required' => true,
'size' => 41,
'maxlength' => 128,
'desc' => $this->l('Estimated delivery time will be displayed during checkout.')
),

effect:
Aip6zbf.png

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...