Osclass Support Forums

Osclass theme support => Veronika Osclass Responsive Theme => Topic started by: arpyke on April 29, 2017, 08:02:59 PM

Title: How to validate a required field(s) on Step 3 of publish listing
Post by: arpyke on April 29, 2017, 08:02:59 PM
i use the cars attribute plugin and i want the make, model, car type, year, fuel and mileage fields to be required
i i have set the required fields in item-post.php
Code: [Select]
make: {
            required: "<?php echo osc_esc_js(__('Make: this field is required.''veronika')); ?>",
          },

          etc....
but when i click on next step button i get the message
i want the message to be prompted on Step 3, where are the required fields.
Can you help me with this issue?
Thanks
Title: Re: How to validate a required field(s) on Step 3 of publish listing
Post by: MB Themes on April 29, 2017, 10:46:23 PM
@arpyke
This field is added to site via ajax & jquery, so it is dynamically generated. I am not sure if dynamically generated HTML tags can be used in validation.
Title: Re: How to validate a required field(s) on Step 3 of publish listing
Post by: arpyke on May 01, 2017, 02:29:20 PM
I can set the fields as required in the cars attributes plugin item-edit.php like
Code: [Select]
<select required>or
Code: [Select]
<input required>but this is not suported by all browsers(just Chrome, Firefox,Opera and IE>=10) and for that is needed js