Post by mupcku » Tue Aug 15, 2017 9:00 pm

Hi everybody! I have created a custom payment module on opencart 2.1.0.1. Im using Journal2 theme and now, i want to add in custompaymentmethod.tpl file one required field! i added it with this code

Code: Select all

<div class="form-group required" style="padding-top: 15px;">
            <label class="control-label" for="input-payment-egn"><?php echo $text_egn; ?></label>
            <input type="text" name="egn" value="" placeholder="Въведете вашето ЕГН" id="input-payment-egn"
                   class="form-control"/>
    </div>
How can i validate it and show an error if the data is not correct? The field must be filled with exactly 10 numbers! Thank you!

https://wedeom.bg
Image


Active Member

Posts

Joined
Tue Jan 24, 2017 8:12 pm
Who is online

Users browsing this forum: No registered users and 71 guests