Question: Trouble Removing Required Fields

Trouble Removing Required Fields

Hi. I had been following your documentation to try to remove required fields for adding suppliers. I am unable to remove requirement of the "Name" field in the Add Supplier form. In /app

MZ

Max Z

Asked
Hi. I had been following your documentation to try to remove required fields for adding suppliers.

I am unable to remove requirement of the "Name" field in the Add Supplier form.

In /app/config/form_validation.php
I have changed rule to other_validation as per documentation.

'companies/add' => array(
array(
'field' => 'name',
'label' => lang('contact_person'),
'rules' => 'other_validation'
),

In the themes/default/admin/views/suppliers/add.php
there is no required="required" for the name field as you can see in the code below.

<?= lang('contact_person', 'contact_person'); ?>
<?php echo form_input('contact_person', '', 'class="form-control" id="contact_person" data-bv-notempty="true"'); ?>

or should I remove this? data-bv-notempty="true"

Also I will do doing this same thing to add customer form, and In your documentation you had referenced the "customers" table
in the database where I should tick the null checkbox. But no such table exists. Where can I find it?
  • MS

    Mian Saleem

    Answered
    Hello,

    You can remove the required validation rule for name and `data-bv-notempty="true"` from view file.

    Biller, customers & suppliers are saved in the same table `sma_companies`

    Thank you
  • Login to Reply