Using Arrays as Field Names |
[eluser]Ninjabear[/eluser]
[quote author="webdevguy" date="1290703879"]I just posted my solution to this problem on my blog at Expandable Input Block In CodeIgniter. It has a working demo and has the ability for useragents to return at a later date and update their entries. I used really basic JavaScript validation in addition to CodeIgniter's validation since CI's error messages were not showing up inline (an absolute necessity in this case since the form could get very long if the users decided to add, say, 50 input blocks). If someone wants to refactor my JQuery into a plug-in and/or improve the front-end validation I would be grateful.[/quote] It's funny you should write this actually. I needed this exact thing for Jquery when I built my site a few months ago (www.fixilink.com). I'll definitely have a look at your solution as well, could be simpiler. I ended up with this piece of code: Code: $(function() Incidentally I never had to extend any libraries as you did and CI picks up the additional info here just fine. However I am just using a single form validation error at the top of the screen for a maximum of five fields. |
Messages In This Thread |
Using Arrays as Field Names - by El Forum - 05-29-2010, 06:50 AM
Using Arrays as Field Names - by El Forum - 05-30-2010, 12:24 PM
Using Arrays as Field Names - by El Forum - 05-30-2010, 03:32 PM
Using Arrays as Field Names - by El Forum - 05-30-2010, 09:35 PM
Using Arrays as Field Names - by El Forum - 05-31-2010, 01:21 AM
Using Arrays as Field Names - by El Forum - 06-01-2010, 07:24 AM
Using Arrays as Field Names - by El Forum - 06-19-2010, 04:12 AM
Using Arrays as Field Names - by El Forum - 06-19-2010, 08:23 AM
Using Arrays as Field Names - by El Forum - 06-19-2010, 12:18 PM
Using Arrays as Field Names - by El Forum - 06-20-2010, 02:01 PM
Using Arrays as Field Names - by El Forum - 06-20-2010, 03:35 PM
Using Arrays as Field Names - by El Forum - 08-02-2010, 03:35 PM
Using Arrays as Field Names - by El Forum - 09-10-2010, 10:43 PM
Using Arrays as Field Names - by El Forum - 09-13-2010, 06:58 AM
Using Arrays as Field Names - by El Forum - 09-13-2010, 03:08 PM
Using Arrays as Field Names - by El Forum - 10-13-2010, 06:33 AM
Using Arrays as Field Names - by El Forum - 11-25-2010, 04:51 AM
Using Arrays as Field Names - by El Forum - 11-25-2010, 05:14 AM
Using Arrays as Field Names - by El Forum - 11-25-2010, 05:15 AM
Using Arrays as Field Names - by El Forum - 04-28-2011, 06:44 AM
Using Arrays as Field Names - by El Forum - 08-03-2011, 09:48 AM
|