can't post values in laravel










1















Hi I'm new to laravel and I create a form then when I tried to post values with textarea it didn't work and this is my code for form:



<form class="form-vertical" role="form" method="post" id="contactForm" action="route('newPage')">
<div class="col-lg-12 col-md-12 col-sm-12" data-aos="zoom-in">
<div class="form-group ">
<label for="username" class="control-label">موضوع:</label>
<input type="text" name="title" class="form-control" id="username"
value=" Request::old('title') ?: ''">
@if ($errors->has('title'))
<span class="help-block">وارد کردن موضوع ضروری است</span>
@endif
</div>
</div>
<div class="clearfix"></div>

<div class="col-lg-12 col-md-12 col-sm-12" data-aos="zoom-in">
<div class="form-group ">
<label for="contents" class="control-label">سرفصل مربوطه به انگلیسی:</label>
<input type="text" name="related_subject" class="form-control" id="username"
value=" Request::old('related_subject') ?: ''">

@if ($errors->has('related_subject'))
<span class="help-block"> وارد کردن سرفصل ضروری است</span>
@endif
</div>
</div>
<div class="clearfix"></div>

<div class="col-lg-12 col-md-12 col-sm-12" data-aos="zoom-in">
<div class="form-group ">
<label for="contents" class="control-label">شرح مطلب:</label>

<textarea type="text" rows="10" cols="100" name="contents"
class=
"form-control" id="message" style="resize:none"></textarea>

@if ($errors->has('contents'))
<span class="help-block"> وارد کردن سرفصل ضروری است</span>
@endif
</div>
</div>
<div class="clearfix"></div>

<div class="col-lg-12" data-aos="zoom-in">
<div class="form-group">
<button type="submit" class="btn btn-primary">Sign up</button>
</div>
</div>
<div class="clearfix"></div>
<input type="hidden" name="_token" value="Session::token()">
</form>


but it works when I use input instead of textarea! I mean when I deleted text area and use an input it works correctly!
How can I solve it?










share|improve this question
























  • Can we have a look at the <form>....</form> ? Just posting the textarea leaves us in so many questions.

    – Sudheesh Singanamalla
    Aug 26 '17 at 7:06












  • Its too long how can I send it for you?

    – SAM
    Aug 26 '17 at 7:08











  • Please update the question with the code or put it up on pastebin and provide a link here.

    – Sudheesh Singanamalla
    Aug 26 '17 at 7:09











  • There is no 'type' property for text area where you have used type='text'

    – Bilal Akbar
    Aug 26 '17 at 7:18












  • Are you getting value for other form elements within your controller

    – Narendrasingh Sisodia
    Aug 26 '17 at 7:21















1















Hi I'm new to laravel and I create a form then when I tried to post values with textarea it didn't work and this is my code for form:



<form class="form-vertical" role="form" method="post" id="contactForm" action="route('newPage')">
<div class="col-lg-12 col-md-12 col-sm-12" data-aos="zoom-in">
<div class="form-group ">
<label for="username" class="control-label">موضوع:</label>
<input type="text" name="title" class="form-control" id="username"
value=" Request::old('title') ?: ''">
@if ($errors->has('title'))
<span class="help-block">وارد کردن موضوع ضروری است</span>
@endif
</div>
</div>
<div class="clearfix"></div>

<div class="col-lg-12 col-md-12 col-sm-12" data-aos="zoom-in">
<div class="form-group ">
<label for="contents" class="control-label">سرفصل مربوطه به انگلیسی:</label>
<input type="text" name="related_subject" class="form-control" id="username"
value=" Request::old('related_subject') ?: ''">

@if ($errors->has('related_subject'))
<span class="help-block"> وارد کردن سرفصل ضروری است</span>
@endif
</div>
</div>
<div class="clearfix"></div>

<div class="col-lg-12 col-md-12 col-sm-12" data-aos="zoom-in">
<div class="form-group ">
<label for="contents" class="control-label">شرح مطلب:</label>

<textarea type="text" rows="10" cols="100" name="contents"
class=
"form-control" id="message" style="resize:none"></textarea>

@if ($errors->has('contents'))
<span class="help-block"> وارد کردن سرفصل ضروری است</span>
@endif
</div>
</div>
<div class="clearfix"></div>

<div class="col-lg-12" data-aos="zoom-in">
<div class="form-group">
<button type="submit" class="btn btn-primary">Sign up</button>
</div>
</div>
<div class="clearfix"></div>
<input type="hidden" name="_token" value="Session::token()">
</form>


but it works when I use input instead of textarea! I mean when I deleted text area and use an input it works correctly!
How can I solve it?










share|improve this question
























  • Can we have a look at the <form>....</form> ? Just posting the textarea leaves us in so many questions.

    – Sudheesh Singanamalla
    Aug 26 '17 at 7:06












  • Its too long how can I send it for you?

    – SAM
    Aug 26 '17 at 7:08











  • Please update the question with the code or put it up on pastebin and provide a link here.

    – Sudheesh Singanamalla
    Aug 26 '17 at 7:09











  • There is no 'type' property for text area where you have used type='text'

    – Bilal Akbar
    Aug 26 '17 at 7:18












  • Are you getting value for other form elements within your controller

    – Narendrasingh Sisodia
    Aug 26 '17 at 7:21













1












1








1








Hi I'm new to laravel and I create a form then when I tried to post values with textarea it didn't work and this is my code for form:



<form class="form-vertical" role="form" method="post" id="contactForm" action="route('newPage')">
<div class="col-lg-12 col-md-12 col-sm-12" data-aos="zoom-in">
<div class="form-group ">
<label for="username" class="control-label">موضوع:</label>
<input type="text" name="title" class="form-control" id="username"
value=" Request::old('title') ?: ''">
@if ($errors->has('title'))
<span class="help-block">وارد کردن موضوع ضروری است</span>
@endif
</div>
</div>
<div class="clearfix"></div>

<div class="col-lg-12 col-md-12 col-sm-12" data-aos="zoom-in">
<div class="form-group ">
<label for="contents" class="control-label">سرفصل مربوطه به انگلیسی:</label>
<input type="text" name="related_subject" class="form-control" id="username"
value=" Request::old('related_subject') ?: ''">

@if ($errors->has('related_subject'))
<span class="help-block"> وارد کردن سرفصل ضروری است</span>
@endif
</div>
</div>
<div class="clearfix"></div>

<div class="col-lg-12 col-md-12 col-sm-12" data-aos="zoom-in">
<div class="form-group ">
<label for="contents" class="control-label">شرح مطلب:</label>

<textarea type="text" rows="10" cols="100" name="contents"
class=
"form-control" id="message" style="resize:none"></textarea>

@if ($errors->has('contents'))
<span class="help-block"> وارد کردن سرفصل ضروری است</span>
@endif
</div>
</div>
<div class="clearfix"></div>

<div class="col-lg-12" data-aos="zoom-in">
<div class="form-group">
<button type="submit" class="btn btn-primary">Sign up</button>
</div>
</div>
<div class="clearfix"></div>
<input type="hidden" name="_token" value="Session::token()">
</form>


but it works when I use input instead of textarea! I mean when I deleted text area and use an input it works correctly!
How can I solve it?










share|improve this question
















Hi I'm new to laravel and I create a form then when I tried to post values with textarea it didn't work and this is my code for form:



<form class="form-vertical" role="form" method="post" id="contactForm" action="route('newPage')">
<div class="col-lg-12 col-md-12 col-sm-12" data-aos="zoom-in">
<div class="form-group ">
<label for="username" class="control-label">موضوع:</label>
<input type="text" name="title" class="form-control" id="username"
value=" Request::old('title') ?: ''">
@if ($errors->has('title'))
<span class="help-block">وارد کردن موضوع ضروری است</span>
@endif
</div>
</div>
<div class="clearfix"></div>

<div class="col-lg-12 col-md-12 col-sm-12" data-aos="zoom-in">
<div class="form-group ">
<label for="contents" class="control-label">سرفصل مربوطه به انگلیسی:</label>
<input type="text" name="related_subject" class="form-control" id="username"
value=" Request::old('related_subject') ?: ''">

@if ($errors->has('related_subject'))
<span class="help-block"> وارد کردن سرفصل ضروری است</span>
@endif
</div>
</div>
<div class="clearfix"></div>

<div class="col-lg-12 col-md-12 col-sm-12" data-aos="zoom-in">
<div class="form-group ">
<label for="contents" class="control-label">شرح مطلب:</label>

<textarea type="text" rows="10" cols="100" name="contents"
class=
"form-control" id="message" style="resize:none"></textarea>

@if ($errors->has('contents'))
<span class="help-block"> وارد کردن سرفصل ضروری است</span>
@endif
</div>
</div>
<div class="clearfix"></div>

<div class="col-lg-12" data-aos="zoom-in">
<div class="form-group">
<button type="submit" class="btn btn-primary">Sign up</button>
</div>
</div>
<div class="clearfix"></div>
<input type="hidden" name="_token" value="Session::token()">
</form>


but it works when I use input instead of textarea! I mean when I deleted text area and use an input it works correctly!
How can I solve it?







php laravel-5 textarea






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 26 '17 at 7:15







SAM

















asked Aug 26 '17 at 7:03









SAMSAM

66




66












  • Can we have a look at the <form>....</form> ? Just posting the textarea leaves us in so many questions.

    – Sudheesh Singanamalla
    Aug 26 '17 at 7:06












  • Its too long how can I send it for you?

    – SAM
    Aug 26 '17 at 7:08











  • Please update the question with the code or put it up on pastebin and provide a link here.

    – Sudheesh Singanamalla
    Aug 26 '17 at 7:09











  • There is no 'type' property for text area where you have used type='text'

    – Bilal Akbar
    Aug 26 '17 at 7:18












  • Are you getting value for other form elements within your controller

    – Narendrasingh Sisodia
    Aug 26 '17 at 7:21

















  • Can we have a look at the <form>....</form> ? Just posting the textarea leaves us in so many questions.

    – Sudheesh Singanamalla
    Aug 26 '17 at 7:06












  • Its too long how can I send it for you?

    – SAM
    Aug 26 '17 at 7:08











  • Please update the question with the code or put it up on pastebin and provide a link here.

    – Sudheesh Singanamalla
    Aug 26 '17 at 7:09











  • There is no 'type' property for text area where you have used type='text'

    – Bilal Akbar
    Aug 26 '17 at 7:18












  • Are you getting value for other form elements within your controller

    – Narendrasingh Sisodia
    Aug 26 '17 at 7:21
















Can we have a look at the <form>....</form> ? Just posting the textarea leaves us in so many questions.

– Sudheesh Singanamalla
Aug 26 '17 at 7:06






Can we have a look at the <form>....</form> ? Just posting the textarea leaves us in so many questions.

– Sudheesh Singanamalla
Aug 26 '17 at 7:06














Its too long how can I send it for you?

– SAM
Aug 26 '17 at 7:08





Its too long how can I send it for you?

– SAM
Aug 26 '17 at 7:08













Please update the question with the code or put it up on pastebin and provide a link here.

– Sudheesh Singanamalla
Aug 26 '17 at 7:09





Please update the question with the code or put it up on pastebin and provide a link here.

– Sudheesh Singanamalla
Aug 26 '17 at 7:09













There is no 'type' property for text area where you have used type='text'

– Bilal Akbar
Aug 26 '17 at 7:18






There is no 'type' property for text area where you have used type='text'

– Bilal Akbar
Aug 26 '17 at 7:18














Are you getting value for other form elements within your controller

– Narendrasingh Sisodia
Aug 26 '17 at 7:21





Are you getting value for other form elements within your controller

– Narendrasingh Sisodia
Aug 26 '17 at 7:21












2 Answers
2






active

oldest

votes


















0














You have issue in your textarea syntax



your code



<textarea type="text" rows="10" cols="100" name="contents"
class=
"form-control" id="message" style="resize:none"></textarea>


normal code for textarea



<textarea rows="10" cols="100" name="contents"
class=
"form-control" id="message" style="resize:none"></textarea>


textarea has no type for more detail you can visit



-W3School html textarea section give you more detail






share|improve this answer























  • I deleted type still it doesn't work!

    – SAM
    Aug 26 '17 at 7:25











  • are you sure kindly give more details about your code like form tags what you are using and controller how you get the form request on the controller ?

    – Zaheer Ahmad
    Aug 27 '17 at 9:11











  • if you want I can send you the controller.

    – SAM
    Aug 27 '17 at 20:03











  • @SAM I hope your issues are fixed if not then let me know and send me the file of controller

    – Zaheer Ahmad
    Aug 31 '17 at 10:03











  • I found the problem but I don't know how to fix it. I'm using a bootstrap template and in it's js folder there is a file: jquery.min where every time I delete this file my textarea works fine! but with that my textarea doesn't work!

    – SAM
    Aug 31 '17 at 10:19


















0














I think you have submitted form use javascript with form's id.

So you should add [form] attribute that same id of form to textarea.



example:
<form name="frmA" id="frmA" action="/" method="post">
<textarea form="frmA"></textarea>
</form>





share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45892799%2ftextarea-cant-post-values-in-laravel%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You have issue in your textarea syntax



    your code



    <textarea type="text" rows="10" cols="100" name="contents"
    class=
    "form-control" id="message" style="resize:none"></textarea>


    normal code for textarea



    <textarea rows="10" cols="100" name="contents"
    class=
    "form-control" id="message" style="resize:none"></textarea>


    textarea has no type for more detail you can visit



    -W3School html textarea section give you more detail






    share|improve this answer























    • I deleted type still it doesn't work!

      – SAM
      Aug 26 '17 at 7:25











    • are you sure kindly give more details about your code like form tags what you are using and controller how you get the form request on the controller ?

      – Zaheer Ahmad
      Aug 27 '17 at 9:11











    • if you want I can send you the controller.

      – SAM
      Aug 27 '17 at 20:03











    • @SAM I hope your issues are fixed if not then let me know and send me the file of controller

      – Zaheer Ahmad
      Aug 31 '17 at 10:03











    • I found the problem but I don't know how to fix it. I'm using a bootstrap template and in it's js folder there is a file: jquery.min where every time I delete this file my textarea works fine! but with that my textarea doesn't work!

      – SAM
      Aug 31 '17 at 10:19















    0














    You have issue in your textarea syntax



    your code



    <textarea type="text" rows="10" cols="100" name="contents"
    class=
    "form-control" id="message" style="resize:none"></textarea>


    normal code for textarea



    <textarea rows="10" cols="100" name="contents"
    class=
    "form-control" id="message" style="resize:none"></textarea>


    textarea has no type for more detail you can visit



    -W3School html textarea section give you more detail






    share|improve this answer























    • I deleted type still it doesn't work!

      – SAM
      Aug 26 '17 at 7:25











    • are you sure kindly give more details about your code like form tags what you are using and controller how you get the form request on the controller ?

      – Zaheer Ahmad
      Aug 27 '17 at 9:11











    • if you want I can send you the controller.

      – SAM
      Aug 27 '17 at 20:03











    • @SAM I hope your issues are fixed if not then let me know and send me the file of controller

      – Zaheer Ahmad
      Aug 31 '17 at 10:03











    • I found the problem but I don't know how to fix it. I'm using a bootstrap template and in it's js folder there is a file: jquery.min where every time I delete this file my textarea works fine! but with that my textarea doesn't work!

      – SAM
      Aug 31 '17 at 10:19













    0












    0








    0







    You have issue in your textarea syntax



    your code



    <textarea type="text" rows="10" cols="100" name="contents"
    class=
    "form-control" id="message" style="resize:none"></textarea>


    normal code for textarea



    <textarea rows="10" cols="100" name="contents"
    class=
    "form-control" id="message" style="resize:none"></textarea>


    textarea has no type for more detail you can visit



    -W3School html textarea section give you more detail






    share|improve this answer













    You have issue in your textarea syntax



    your code



    <textarea type="text" rows="10" cols="100" name="contents"
    class=
    "form-control" id="message" style="resize:none"></textarea>


    normal code for textarea



    <textarea rows="10" cols="100" name="contents"
    class=
    "form-control" id="message" style="resize:none"></textarea>


    textarea has no type for more detail you can visit



    -W3School html textarea section give you more detail







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Aug 26 '17 at 7:21









    Zaheer AhmadZaheer Ahmad

    868




    868












    • I deleted type still it doesn't work!

      – SAM
      Aug 26 '17 at 7:25











    • are you sure kindly give more details about your code like form tags what you are using and controller how you get the form request on the controller ?

      – Zaheer Ahmad
      Aug 27 '17 at 9:11











    • if you want I can send you the controller.

      – SAM
      Aug 27 '17 at 20:03











    • @SAM I hope your issues are fixed if not then let me know and send me the file of controller

      – Zaheer Ahmad
      Aug 31 '17 at 10:03











    • I found the problem but I don't know how to fix it. I'm using a bootstrap template and in it's js folder there is a file: jquery.min where every time I delete this file my textarea works fine! but with that my textarea doesn't work!

      – SAM
      Aug 31 '17 at 10:19

















    • I deleted type still it doesn't work!

      – SAM
      Aug 26 '17 at 7:25











    • are you sure kindly give more details about your code like form tags what you are using and controller how you get the form request on the controller ?

      – Zaheer Ahmad
      Aug 27 '17 at 9:11











    • if you want I can send you the controller.

      – SAM
      Aug 27 '17 at 20:03











    • @SAM I hope your issues are fixed if not then let me know and send me the file of controller

      – Zaheer Ahmad
      Aug 31 '17 at 10:03











    • I found the problem but I don't know how to fix it. I'm using a bootstrap template and in it's js folder there is a file: jquery.min where every time I delete this file my textarea works fine! but with that my textarea doesn't work!

      – SAM
      Aug 31 '17 at 10:19
















    I deleted type still it doesn't work!

    – SAM
    Aug 26 '17 at 7:25





    I deleted type still it doesn't work!

    – SAM
    Aug 26 '17 at 7:25













    are you sure kindly give more details about your code like form tags what you are using and controller how you get the form request on the controller ?

    – Zaheer Ahmad
    Aug 27 '17 at 9:11





    are you sure kindly give more details about your code like form tags what you are using and controller how you get the form request on the controller ?

    – Zaheer Ahmad
    Aug 27 '17 at 9:11













    if you want I can send you the controller.

    – SAM
    Aug 27 '17 at 20:03





    if you want I can send you the controller.

    – SAM
    Aug 27 '17 at 20:03













    @SAM I hope your issues are fixed if not then let me know and send me the file of controller

    – Zaheer Ahmad
    Aug 31 '17 at 10:03





    @SAM I hope your issues are fixed if not then let me know and send me the file of controller

    – Zaheer Ahmad
    Aug 31 '17 at 10:03













    I found the problem but I don't know how to fix it. I'm using a bootstrap template and in it's js folder there is a file: jquery.min where every time I delete this file my textarea works fine! but with that my textarea doesn't work!

    – SAM
    Aug 31 '17 at 10:19





    I found the problem but I don't know how to fix it. I'm using a bootstrap template and in it's js folder there is a file: jquery.min where every time I delete this file my textarea works fine! but with that my textarea doesn't work!

    – SAM
    Aug 31 '17 at 10:19













    0














    I think you have submitted form use javascript with form's id.

    So you should add [form] attribute that same id of form to textarea.



    example:
    <form name="frmA" id="frmA" action="/" method="post">
    <textarea form="frmA"></textarea>
    </form>





    share|improve this answer



























      0














      I think you have submitted form use javascript with form's id.

      So you should add [form] attribute that same id of form to textarea.



      example:
      <form name="frmA" id="frmA" action="/" method="post">
      <textarea form="frmA"></textarea>
      </form>





      share|improve this answer

























        0












        0








        0







        I think you have submitted form use javascript with form's id.

        So you should add [form] attribute that same id of form to textarea.



        example:
        <form name="frmA" id="frmA" action="/" method="post">
        <textarea form="frmA"></textarea>
        </form>





        share|improve this answer













        I think you have submitted form use javascript with form's id.

        So you should add [form] attribute that same id of form to textarea.



        example:
        <form name="frmA" id="frmA" action="/" method="post">
        <textarea form="frmA"></textarea>
        </form>






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 '18 at 6:12









        Quy LeQuy Le

        1,5481315




        1,5481315



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45892799%2ftextarea-cant-post-values-in-laravel%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            How to read a connectionString WITH PROVIDER in .NET Core?

            Node.js Script on GitHub Pages or Amazon S3

            Museum of Modern and Contemporary Art of Trento and Rovereto