Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebox adding commas to input

I'm using a facebox to display a form inside a lightbox, nothing too exciting (just a couple of datepickers, some textboxes and a checkbox). However, I'm having issues with the postbacks, whenever I post back from the facebox it adds a ',' to the start of the input (so "rabbit" becomes ",rabbit") Now, I saw that there was the same issue with the modalpopup extender from the ajaxcontroltoolkit, so I assume it's a common issue.

Can anyone either explain why this is happening, or tell me how to fix it? provide a decent way of fixing this? I have actually done it, and it works very nicely, but I don't really want to answer my own bounty question so someone else give it a go!

Cheers, Ed

EDIT

See attached answer for a correct solution (I fixed this eventually but didn't want to ruin the bounty question so left the answer until afterwards).

like image 386
Ed James Avatar asked Oct 15 '22 11:10

Ed James


1 Answers

Why don't you trim the output? simply remove the ',' for each string

like image 64
ant Avatar answered Nov 15 '22 05:11

ant