Make the description form not required
(In item post)
To change in oc-includes/osclass/frm/Form.form.class.php.php
static protected function generic_textarea($name, $value) {
$name = osc_esc_html($name);
if($value=='') echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">PUT HERE THE TEXT YOU WANT TO APPEAR ALWAYS IN THE DESCRIPTION. FOR EXAMPLE: YOURWEB.COM</textarea>';
else echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">' . $value . '</textarea>';
}
}
It works, but now this comes out:
Error "Description: enter at least 10 characters"
They are things of osclass. You can try adding something like: post for free on myweb.com
Or try modifying the number 10 that appears on "rows", or looking at itempost.php in your theme
I know, I know
I was thinking of "Delete" the description field and make a new one in extras, so I don't have to suffer anymore
Take advantage of what I have told you so that your website appears in the description, in case someone shares it on their social networks. If Osclass asks you for 10 characters, put a phrase like: post for free on myweb.com
The description field is something that Osclass asks for, if you don't want the user to touch it, search Google for something like hide or hidden, for example: <input type = "hidden">
Or to hide an element in div, use:
display: none;
visibility: hidden;
In <div style = "display: none"> here description field </div>
I am trying to make it work, what I need is when users want to place the description do it, and when not, no !, I do not want to hide it, just be a field where they want to fill or not
To change in oc-includes/osclass/frm/Form.form.class.php.php
static protected function generic_textarea($name, $value) {
$name = osc_esc_html($name);
if($value=='') echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">PUT HERE THE TEXT YOU WANT TO APPEAR ALWAYS IN THE DESCRIPTION. FOR EXAMPLE: YOURWEB.COM</textarea>';
else echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">' . $value . '</textarea>';
}
}
The description field must have text to be published. Add a phrase there so that the same phrase is always published, if you want to leave a space for them to add their text, add <br/> <br/> before your text.
So when someone wants to add something in description, they can do it and if they don't want to add anything in description, your sentence will come out.
But it cannot be blank, because Osclass forces the text to exist.
Try to see if putting 10 spaces, Osclass allows you to publish: