add a textarea field in OrangeHRM

172 Views Asked by At

I need to add a text area field in Job screen.

I tried with a custom field but I can only add a simple textbox. How can I add a textarea?

I have never worked with symfony so I need a very simple and detailed solution, please.

1

There are 1 best solutions below

0
Mayur Vijay Kathale On

In orangeHRM or Symfony1.4, if you want to add new field in any form you have to define new field in PHP array which will be rendered in Screen. In your case to add field in viewJobDetails page.

Add field, validator in PHP array as follows. 1. Go to symfony/plugins/orangehrmPimPlugin/lib/form/EmployeeJobDetailsForm.php 2. add following code in $this->setWidgets(array(add given code here));

'new_field' => new sfWidgetFormTextarea()
  1. add following code in $this->setValidators(array(add given code here));

    'new_field' => new sfValidatorString(array('required' => false))

Hope this will help.