waldek Developer Od Poland Člen od mar 2023 waldek 10 aug 2023 17:41 Hi. how to force company name, TAX ID and validation ? Regards
tim Founder Od Sweden Člen od máj 2013 tim 11 aug 2023 01:56 Hi. For creating an account. Add the check on the server side. For polish validations Google is your friend. https://github.com/litecart/litecart/blob/dev/public_html/pages/create_account.inc.php#L42 Add the parameter "required" to the attributes of the input element. https://github.com/litecart/litecart/blob/dev/public_html/includes/templates/default.catalog/pages/create_account.inc.php#L28 Example on line 44
waldek Developer Od Poland Člen od mar 2023 waldek 11 aug 2023 11:00 Thank you for your answer. I mean this form...
tim Founder Od Sweden Člen od máj 2013 tim 12 aug 2023 15:56 The HTML elements: https://github.com/litecart/litecart/blob/2.5.4/public_html/includes/templates/default.catalog/views/box_checkout_customer.inc.php <?php echo functions::form_draw_text_field('company', true, 'required'); // See how I added required ?> The validation logic: https://github.com/litecart/litecart/blob/2.5.4/public_html/includes/entities/ent_order.inc.php#L562 throw new Exception(language::translate('error_missing_company', 'You must enter a company name.')); }```