S
S
SLaMeeR2016-09-04 12:11:21
DLE
SLaMeeR, 2016-09-04 12:11:21

How to disable the ability in DLE to write the title of news to users?

How to disable the ability in DLE to write the title of news to users? When you remove the line in the code where to write the title of the news, or you do not fill it out, the error "The title is required when writing an article" appears.
How can I turn it off?
The code

<div class="block"> 	
    <div class="block-head"> 
  <tr>
<div class="baseform">	
  <table class="tableform">
    <tr>
      <td class="label">
        <b>Название:</b>
      </td>
      <td><input type="" id="title" name="title" value="{title}Грех #" maxlength="150" class="f_input" />&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2">
        <b>Грех:</b>
        [not-wysywyg]
        <div class="bb-editor">
          {bbcode}
          <textarea name="short_story" id="short_story" style="margin: 0px; resize: none; width: 638px; height: 225px;" onfocus="setFieldName(this.name)" rows="15" cols="83" class="f_textarea" >{short-story}</textarea>
        </div>
        [/not-wysywyg]
        {shortarea}
      </td>
    </tr>
  </table>
  <div class="fieldsubmit">
    <button name="add" class="comments-but" type="submit"><span>Поделиться</span></button>
  </div>
</div>
</div>
</div>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikolai, 2016-09-04
@SLaMeeR

fill with default value and hide input from user

P
Pavel Belousov, 2016-09-04
@PafNutY

Just write a hidden field instead of the usual one and add a default value for it:

<input type="hidden" name="title" value="Грех #" />

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question