Jump to content

How to add the symbol for required fields?


Recommended Posts

Hi guys, I have a module for two types of customers to register. Just to be clear, the fields are a requirement, and Prestashop knows that, but it doesn't show the " * " symbol next to those fields and I want to display those symbols so that everybody knows that those fields are a requirement. Otherwise, they might ignore and they wouldn't be able to finish the registration without frustration.

 

So the question is, how do I add the red asterix symbol which specifies that the fields are a requirement for registration?

Link to comment
Share on other sites

Hello tuk66. If you're refering to the customer.php from classes, it won't have any effect because I need to modify inside the module that provides me with those fields. The problem is that if I write that string inside it's file from classes folder, it won't display the asterix.

Link to comment
Share on other sites

From what I understand, if I simply add "'required' => true" to each field from the following code, it will show the asterix, but it doesn't happen.

 

Code:

	public static $definition = array(
		'table' => 'date_firme_persoana_juridica',
		'primary' => 'id',
		'fields' => array(	
			'id_customer' => 				array('type' => self::TYPE_INT),	
			'numefirma' => 					array('type' => self::TYPE_STRING),
			'cui' =>						array('type' => self::TYPE_STRING),
			'cif' =>						array('type' => self::TYPE_STRING),
			'cont_bancar'=>					array('type' => self::TYPE_STRING),
			'banca' => 						array('type' => self::TYPE_STRING),
			'judetsediusocial' =>		    array('type' => self::TYPE_STRING),
			'orassediusocial' =>			array('type' => self::TYPE_STRING),
			'adresasediusocial' =>			array('type' => self::TYPE_STRING),	
		),
	);	

After edit:

public static $definition = array(
		'table' => 'date_firme_persoana_juridica',
		'primary' => 'id',
		'fields' => array(	
			'id_customer' => 				array('type' => self::TYPE_INT, 'required' => true),	
			'numefirma' => 					array('type' => self::TYPE_STRING, 'required' => true),
			'cui' =>						array('type' => self::TYPE_STRING, 'required' => true),
			'cif' =>						array('type' => self::TYPE_STRING, 'required' => true),
			'cont_bancar'=>					array('type' => self::TYPE_STRING, 'required' => true),
			'banca' => 						array('type' => self::TYPE_STRING, 'required' => true),
			'judetsediusocial' =>		    array('type' => self::TYPE_STRING, 'required' => true),
			'orassediusocial' =>			array('type' => self::TYPE_STRING, 'required' => true),
			'adresasediusocial' =>			array('type' => self::TYPE_STRING, 'required' => true),	
		),
	);	
Edited by Alex Nitu (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...