<" />
      <" />
        <"/>
        DEVHIDE
        • Home (current)
        • About
        • Contact
        • Cookie
        • Home (current)
        • About
        • Contact
        • Cookie
        • Disclaimer
        • Privacy
        • TOS
        Login Or Sign up

        Symfony 6, form textarea not posted after submiting the form

        104 Views Asked by Miguel Mejia At 02 January 2024 at 13:01 2025-12-22T21:53:29.360000

        I have simple contact form:

        <form id='contactform' action="{{ path('app_contact_send') }}" method="POST" name="contactform">
            <ul class="form-cover">
                <li class="inp-name">
                    <label>Nombre * (requerido)</label>
                    <input id="name" type="text" name="your-name">
                </li>
            <li class="inp-text">
                    <label>Mensaje * (requerido)</label>
                    <textarea id="mess" name="mess"></textarea>
                </li>
                <li class="inp-email">
                    <label>E-mail * (requerido)</label>
                    <input id="email" type="email" name="your-email">
                </li>
            </ul>
            <div class="btn-form-cover">
                <button id="#submit" type="submit" class="btn">enviar</button>
            </div>
        </form>
        

        After clicking the submit button I have a controller that gathers data from the from:

                $name = $request->request->get('name');
                $from = $request->request->get('email');
                $mess = $request->request->get('mess');
        

        Then use the data to sent an email with symfony mailer in a POST method in the controller:

        $email = (new Email())
                ->from($from)
                ->replyTo($from)
                ->to('[email protected]')
                ->cc('[email protected]')
                ->bcc('[email protected]')
                ->replyTo($from)
                ->subject('Mensaje desde www.website.com')
                ->text(sprintf('Mensaje enviado: %s, por: %s.', $mess, $name));
        

        Email is sent but variable 'mess' gathered form textarea is always empty, name and email have values.

        Is anything more I have to do for textarea type fielsds?

        Requests are managed by Symfony UX Turbo.

        variable mess should have a value.

        php ajax symfony symfony-forms symfonyux
        Original Q&A
        1

        There are 1 best solutions below

        0
        Miguel Mejia Miguel Mejia On 03 January 2024 at 13:06

        I did track this down to a js file where the mouse click is being captured, the form values posted to an array.

        Modify this to match the fields on the form.

        This solve the problem.

        Related Questions in PHP

        • How to add the dynamic new rows from my registration form in my database?
        • Issue in payment form gateway
        • How to create a facet for WP gridbuilder that displays both parent and child custom fields?
        • Function in anonymous Laravel Blade component
        • How to change woocomerce or full wordpress currency with value from USD to AUD
        • General questions about creating a custom theme Moodle CMS
        • How to add logging to an abstract class in php
        • error 500 on IIS FastCGI but no clue despite multiple error loggings activated
        • Composer installation fails and reverts ./composer.json and ./composer.lock to original content
        • How to isolate PHP apps from each other on a local machine(Windows or Linux)?
        • Laravel: Using belongsToMany relationship with MongoDB
        • window.location.href redirects but is causing problems on the webpage
        • Key provided is shorter than 256 bits, only 64 bits provided
        • Laravel's whereBetween method not working with two timestamps
        • Implementing UUID as primary key in Laravel intermediate table

        Related Questions in AJAX

        • window.location.href redirects but is causing problems on the webpage
        • Js variable to php using ajax
        • TypeError: Failed to execute 'arrayBuffer' on 'Blob': Illegal invocation - Insert blob into database
        • how do I change a URL with form to include additional selection
        • why i have to put extra space in before write option selected because it show error if i don't ' option:selected'
        • Opening modal through Update button with specified ID using ajax
        • Events disappear randomly for full calendar module
        • Ajax call reloads page in FrontAccounting, a PHP ERP solution
        • Add newly added record to select2 element
        • AJAX query cascading dropdown in django
        • Failed to load resource: the server responded with a status of 403 () - SCRIPT - WordPress
        • Maintaining search and sort state across paginated results in web application
        • Getting POST 500 Internal server error while sending request via ajax call
        • Wordpress server side datatable filtering
        • Having a problem in datatables and fullcalendar scripts

        Related Questions in SYMFONY

        • Key provided is shorter than 256 bits, only 64 bits provided
        • Troubleshooting form submission in PrestaShop's hookDisplayAdminProductsExtra module
        • Symfony Framework - Route cannot be found even if it is defined in Controller
        • Opening modal through Update button with specified ID using ajax
        • Can't revert a Loggable entity because of a Doctrine repository error
        • Symfony form type option issues
        • How to redirect all shopware logs (monolog) including plugins (bundles) to single target like a file or stderr
        • Serialization Symfony return empty array
        • scheb/2fa not detected/working on my project
        • Dynamically Adding Serialization Groups to Properties in Symfony 6.4 Using Traits
        • symfony No identifier/primary key specified for Entity "App\Entity\Etablissement"
        • Symfony basic auth doesn't work specifically in test
        • Laravel 11 upgrade with Laravel Nova v.26.4 and Symfony/finder 7
        • Does Symfony need the user to be online inorder to handle messages in the messenger queue?
        • How to temporary disable Xdebug for cache/container building code, but that it remains enabled for the rest of the execution?

        Related Questions in SYMFONY-FORMS

        • put white spaces when entering an amount moneytype symfony
        • With Symfony form, how to change ChoiceType values according to another value?
        • Expected argument of type "int", "App\Entity\Autoridad" given at property path "id_autoridad"
        • Symfony mailer - unable to override default mailer -
        • Symfony form to manage OneToManyToOne relation (ManyToMany with extra fields)
        • Symfony issue - Registration form
        • Symfony 7 Dynamically Modified Forms
        • How to get a Symfony Embedded Dynamic Form Unmapped data
        • How to set an EntityType field to be readonly/disabled, so that value cannot be edited but is still sent with the form?
        • How to insert CollectionType unmapped image into db in Symfony?
        • In OneToMany relation, Image is null in Symfony 6
        • Symfony Form - Custom collection entry theme block for block_prefix
        • Symfony 6.4 Embed Form data loss after re-submit
        • Symfony can't validate User Login Form
        • Symfony 7 form CollectionType with additional parameters

        Related Questions in SYMFONYUX

        • Live Component Updating a parent model from a collection child
        • How to make an knp paginator pagination with a SearchBar Live component in Symfony?
        • Symfony 6, form textarea not posted after submiting the form
        • Symfony UX - TomSelect Autocomplete custom js controller problem
        • symfony ux-live
        • Symfony UX React with .tsx file not working?
        • impossible to use vue-multiseclect in symfony-ux-vue
        • Integrate Braintree Dropin UI with Symfony UX Live Component
        • Symfony ux-react: React component does not render when using react_component()
        • Symfony UX Autocomplete - choice_label with KnpLabs Translatable
        • Symfony UX and VueJs - multi-bundle structure
        • Symfony UX Chart.js just display a blank square
        • ClassNotFoundError in Symfomy 6 project
        • Symfony UX Swup, Unknown "stimulus_controller" function
        • Symfony UX - How to mix 2 Live Components?

        Trending Questions

        • UIImageView Frame Doesn't Reflect Constraints
        • Is it possible to use adb commands to click on a view by finding its ID?
        • How to create a new web character symbol recognizable by html/javascript?
        • Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
        • Heap Gives Page Fault
        • Connect ffmpeg to Visual Studio 2008
        • Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
        • How to avoid default initialization of objects in std::vector?
        • second argument of the command line arguments in a format other than char** argv or char* argv[]
        • How to improve efficiency of algorithm which generates next lexicographic permutation?
        • Navigating to the another actvity app getting crash in android
        • How to read the particular message format in android and store in sqlite database?
        • Resetting inventory status after order is cancelled
        • Efficiently compute powers of X in SSE/AVX
        • Insert into an external database using ajax and php : POST 500 (Internal Server Error)

        Popular # Hahtags

        javascript python java c# php android html jquery c++ css ios sql mysql r reactjs

        Popular Questions

        • How do I undo the most recent local commits in Git?
        • How can I remove a specific item from an array in JavaScript?
        • How do I delete a Git branch locally and remotely?
        • Find all files containing a specific text (string) on Linux?
        • How do I revert a Git repository to a previous commit?
        • How do I create an HTML button that acts like a link?
        • How do I check out a remote Git branch?
        • How do I force "git pull" to overwrite local files?
        • How do I list all files of a directory?
        • How to check whether a string contains a substring in JavaScript?
        • How do I redirect to another webpage?
        • How can I iterate over rows in a Pandas DataFrame?
        • How do I convert a String to an int in Java?
        • Does Python have a string 'contains' substring method?
        • How do I check if a string contains a specific word?
        .

        Copyright © 2021 Jogjafile Inc.

        • Disclaimer
        • Privacy
        • TOS
        • Homegardensmart
        • Math
        • Aftereffectstemplates