No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Template button submit not submitted

    Framework
    4
    7
    769
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      BodaMat last edited by

      Hi everyone!
      I use component input with send button. I add attribute type=“submit” to q-btn and add @submit to q-form. When I click button form not submitted, but when q-btn out the <template> and <q-input> form submitted. Can you help me?
      Quasar v1.2.4

                   <q-form 
        	  		@submit="sendMessage"
        	  		class="full-width">
      	  	    <q-input
      	  	    	v-model="newMessage"
      	  	    	bg-color="white"
      	  	    	outlined
      	  	    	rounded
      	  	    	label="Message"
      	  	    	dense>
      
      	  	      <template v-slot:after>
      	  	        <q-btn
      	  	        	round
      	  	        	dense
      	  	        	flat
      	  	        	type="submit"
      	  	        	color="white"
      	  	        	icon="send" />
      	  	      </template>
      	  	    </q-input>
        	  	</q-form>
      
      1 Reply Last reply Reply Quote 0
      • dazaizone
        dazaizone last edited by

        noob suggestion here (trying to help) , how about @click ? then add event.

        1 Reply Last reply Reply Quote 0
        • B
          BodaMat last edited by

          thanks i fix this problem

          1 Reply Last reply Reply Quote 0
          • T
            ttquoccuong last edited by

            same me when upgrade to lastest version. just use @click and wait for next version 🙂

            1 Reply Last reply Reply Quote 0
            • B
              BodaMat last edited by

              Thank you!

              1 Reply Last reply Reply Quote 0
              • yuranfaizal
                yuranfaizal last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • yuranfaizal
                  yuranfaizal last edited by

                  i just add this @click=“sendMessage” to my botton as its inside of template or you take out the botton of the form tag

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post