Skip to content

Tag: forms

Duplicate fields in a form upon selection

I made a form to select skills. After the 1st selection is made, a 2nd list is shown with options depending of the 1st choice. Then, a “+” button allow to duplicate the fields ans add another skill. My problem : The inital form is OK but when I press “+” the second form created doesn&#…

JQuery autosubmit does not work in Safari

I have a form that I want to autosubmit using JQuery. However, it doesn’t work in older versions of Safari (macOS Mojave, iOS 12). It works in Chrome, Firefox, and iOS 13. So, this is most likely a Safari bug, but I have a lot of users with devices running the older software, so I need to work around it…

javascript – laravel reset form

My form reset button doesnt reset my form. I added a class for my dropdowns to be hidden unless theres a change in select. The current behavior is clicking the reset button will only reset its values but doesn’t hide the supposed to be hidden dropdowns. my reset button script i used Can’t find any…

Show/Hide elements JavaScript

I am attempting to create forms that are hidden on each page. I figure I had to make a separate functions for each button and form that I wanted to hide. So my logic was to use the same code on separate JS pages but changing the id and function names on each JS page. However when I do so,

Onclick the + button, add fields [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question when you click on the “+” button, regenerate all fields below …

How to clear react state in modal after closing?

I’ve got a product card with product details shown. On the bottom, there is an ‘edit’ button. When clicked it shows a modal with prefilled input fields, that can be edited then saved. Modal can also be closed without saving (but with input fields edited). My problem is that when a user edits…

Submitting form with textarea in React

I have a textarea that I want to stringify to JSON on form submission. I will even settle for just having the function set the textarea value. let value does not update. Do I need to use setState? this? Answer There are a number of issues in the code indicating a lack of familiarity with the excellent React t…

Form Submit Confirmation With SweetAlert2

I’m working on a project that needs confirmation before submit the form, to do that I’m using SweetAlert2 but it doesn’t work in any way. I tried with the code from another threads but I have the same issue, the page loads and when I submit the form, it doesn’t do anything (well, it su…