Alex Nitu Posted May 7, 2015 Share Posted May 7, 2015 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 More sharing options...
tuk66 Posted May 7, 2015 Share Posted May 7, 2015 See $definition['fields'] array in Customer.php. Required fields have 'required' => true Link to comment Share on other sites More sharing options...
Alex Nitu Posted May 7, 2015 Author Share Posted May 7, 2015 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 More sharing options...
Alex Nitu Posted May 7, 2015 Author Share Posted May 7, 2015 (edited) 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 May 7, 2015 by Alex Nitu (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted May 7, 2015 Share Posted May 7, 2015 It was just a hint. I don't know that module. You can surely add the asterisk, but it doesn't mean that the field is also required. Link to comment Share on other sites More sharing options...
Alex Nitu Posted May 7, 2015 Author Share Posted May 7, 2015 It was a good hint, but the problem is not making the fields required, because they already are. I only need to add the bloody asterix ) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now