Posted By admin
Tags: ,
Dynamic Form Fields – Add & Remove

Try to use [“remove”,””) ] replace [ ] then will fix 10 new fields bug.,I think it is not working with bootstrap 4.0.0. any experience with this?,How can I use this feature to add it as way to do a search to my database?i.e the PHP query will as an example be SELECT * FROM TABLENAME WHERE Field1 = “Input1” OR Field1 = “Input2” OR Field1 = “Input3” etc….,Does anyone have an example of adding a group of fields at once?,How to use it in reactjs?,a few bugs else its fine…..for a better solution visit inflatingknowledge.blogspot…,Great,Does anyone know how or if it is possible to add angularJs ng-autocomplete when a new input tag is created?…,Nice one .goodTake a look at this tutorial for easy solution…,How can I make this work with a set of input fields on a form?,To fix the issue with the delete button after 10 input boxes, replace this line “;” with this line ““whatever the last character is before the number”)+1);” in this case the last character will be “e” since the delete button id is “remove” and then the number.The issue with this is that the charAt function is grabbing the very last character, once you have ten fields, the very last character is 0 so it will delete the first input and leave the delete button. Hope this helps anybody else who visits this later.,Thanks for the fix!,No problem.,How can I get this to work if I have more than just one field being added/removed? I have accomplished that already, I just haven’t figured out the 10 problem,Edit-Nevermind, I tried ‘e’ like he used and it works perfectly. ,”“e”)+1);” this is all you have to do.,latest link also had a bug when created input groups are more than 10 then the delete button removes only the btn-danger button not the input text field with it.,There is some bug with fields after 10 new fields was created.On 11, 12, etc fields script doesn’t work correctly.Red block disappears, but input field still showing.,while the idea is cool it appears that clicking return will delete the top most entry if you are focused on one of the inputs. This happened in Chrome and Firefox. Is that a bug or a feature? Either way I would fix it.,Ok, here is a fixed version:…,you can fix it by preventing the enter key event on your form :, $( “#form” ).keypress(function(e) { if ( e.which == 13 ) { e.preventDefault(); } });,works great – nice job on the fast correction,The author is cgrdavies

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Related Snippets

Leave a comment

Your email address will not be published. Required fields are marked *