A
A
Aristarchus2018-10-28 13:16:01
DLE
Aristarchus, 2018-10-28 13:16:01

DLE 13, how to send additional values ​​in comments?

Hello!
There was a problem with DLE
. I decided to add a couple of fields to the comment template:

<label><input type="radio" name="comment_type" value="g" > Положительный</label>
<label><input type="radio" name="comment_type" value="n" > Нейтральный</label>

In the handler I wrote: var_dump($_POST);
After submitting the form, I get:
{
  ["post_id"]=> string(3)
  "112" ["comments"]=> string(1960)
  "TEXT" ["name"]=> string(11)
  "1EnderStore" ["mail"]=> string(0)
  "" ["editor_mode"]=> string(0)
  "" ["skin"]=> string(7)
  "Site" ["sec_code"]=> string(0)
  "" ["question_answer"]=> string(0)
  "" ["g_recaptcha_response"]=> string(0)
  "" ["allow_subscribe"]=> string(1)
  "1" ["user_hash"]=> string(40)
  "8619f43a6dee3412b97cd4e9fb6df1bd56d0bd69"
}

without formatting:
<code>array(11) { ["post_id"]=> string(3) "112" ["comments"]=> string(1960) "TEXT" ["name"]=> string(11) "1EnderStore" ["mail"]=> string(0) "" ["editor_mode"]=> string(0) "" ["skin"]=> string(7) "LumFilm" ["sec_code"]=> string(0) "" ["question_answer"]=> string(0) "" ["g_recaptcha_response"]=> string(0) "" ["allow_subscribe"]=> string(1) "1" ["user_hash"]=> string(40) "8619f43a6dee3412b97cd4e9fb6df1bd56d0bd69" }</code>

And somehow it doesn't mattercomment_type

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Aristarchus, 2018-10-28
@EnderStore

In general, dle_js was blocking the send

D
dollar, 2018-10-28
@dollar

Apparently, the value should be chosen.
Make the third value "?" and make it the default (selected).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question