Jo Van Driessche Posted September 30, 2017 Share Posted September 30, 2017 Hi, is there a possibility to limit the address fields to e.g. 30 characters? if yes, where can I adjust this please?thanks, Jo Link to comment Share on other sites More sharing options...
Scully Posted October 2, 2017 Share Posted October 2, 2017 You had to change the program code or use some javascript. But since we don't know your prestashop version .... help not possible. Link to comment Share on other sites More sharing options...
NemoPS Posted October 2, 2017 Share Posted October 2, 2017 do you mean the "address" field or any field belonging to the address object where customers can input something? Link to comment Share on other sites More sharing options...
Jo Van Driessche Posted October 2, 2017 Author Share Posted October 2, 2017 Hi, the address1 field should be limited to 30char, because the Belgian post Bpost, seems not to allow this on their official printed labels. So in need to find a way to prevent this during the address input. I'm using 1.6.1.15thanks Jo Link to comment Share on other sites More sharing options...
Scully Posted October 2, 2017 Share Posted October 2, 2017 ./classes/Adress.php Try to change the length parameter at the end of appx. line 122. 'address1' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'required' => true, 'size' => 128), Report back. Link to comment Share on other sites More sharing options...
Jo Van Driessche Posted October 4, 2017 Author Share Posted October 4, 2017 thanks for reply Scully but changing the size parameter only makes the box smaller, do you know what the changes the input? I read something like 'maxlength' => 30, but seems not to work either. Sorry I'm not a developer, so can read/write PhP 'address1' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'required' => true, 'size' => 128), Link to comment Share on other sites More sharing options...
Scully Posted October 6, 2017 Share Posted October 6, 2017 Jo, I cannot confirm your findings - at least not for PS 1.6.1 up to latest available version. Changing the code leads to a correct error message when exceeding 32 characters. You might have another prestashop version running or you changed it the wrong way. 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