The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
problem with submitting values multiple select - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: problem with submitting values multiple select (/showthread.php?tid=603) |
RE: problem with submitting values multiple select - Ben - Apr 18th, 2010 Hi Bert, Try double-escaping the commas. Code: rules.push("reg_exp,aantal_groen,^\s*(0|1|2|3|4|5|6|8|9|\\,\)\s*$,i,alleen cijfers en komma!"); I think that should fix it... - Ben RE: problem with submitting values multiple select - bvdveen - Apr 18th, 2010 (Apr 18th, 2010, 10:47 AM)Ben Wrote: Hi Bert, Hi Ben! Of course I immediately tried your solution....it fixed the error but didn't help ...when i put in a sequence of numbers and comma's it still gives the error (Apr 18th, 2010, 12:58 PM)bvdveen Wrote: [quote='Ben' pid='2609' dateline='1271616476'] Hi Ben! Of course I immediately tried your solution....it fixed the error but didn't help ...when i put in a sequence of numbers and comma's it still gives the error. I want users to be able ti fill in any number with up to 4 digits or 3 digits with a comma as decinal separation. would the following work? rules.push("reg_exp,aantal_groen,^\s*(0|0\\,\25|0\\,\50\0\\,75|......)\s*$,i,alleen cijfers en komma!"); RE: problem with submitting values multiple select - Ben - Apr 18th, 2010 Quote:I want users to be able ti fill in any number with up to 4 digits or 3 digits with a comma as decinal separation. Ah, okay! Hmm... try this instead: Code: rules.push("reg_exp,aantal_groen,^\s*[0-9\\,]{3,4}\s*$,i,alleen cijfers en komma!"); The "[0-9\\,]" bit is a "character class". It matches any number, 0-9 and the comma (double escaped to make it work within the string). The {3,4} bit matches the preceding expression either 3 or 4 times. I think that'll work... - Ben RE: problem with submitting values multiple select - bvdveen - Apr 18th, 2010 (Apr 18th, 2010, 4:59 PM)Ben Wrote:Quote:I want users to be able ti fill in any number with up to 4 digits or 3 digits with a comma as decinal separation. Hello Ben, I am sorry to say that it still doesn't work. I want my users to be able to fill in numbers as: 1 2 2,24 0,01 when I try these options it still gives me my errormessage: alleen cijfers en komma.... Thanks anyway for reviewing my 'beginners' question..... I hope you still somehow find the energy to try to resolve mu problem. If not I will have to revert to make it a drop down box with 0 | 0,25 | 0,50| etc.. I have tried all options even against your advice to double escape the comma...no solution yet. I would be very happy if you could help me with it. No time to follow a programmers course...;-) Greetings Bert RE: problem with submitting values multiple select - Ben - Apr 20th, 2010 Hi Bert, Ah, sorry I didn't realize you needed to cover all those cases. In that case, I'd open it up to allow any sequence of characters 1-4 digits long that contain those characters (0-9 & ,). Try this: Code: rules.push("reg_exp,aantal_groen,^\s*[0-9\\,]{1,4}\s*$,i,alleen cijfers en komma!"); - Ben RE: problem with submitting values multiple select - bvdveen - Apr 21st, 2010 (Apr 20th, 2010, 8:26 PM)Ben Wrote: Hi Bert, Hi Ben, Please have a look at my form online: http://www.bvdveen.com/hortivorm/werktijden.html Feel free to post as many times that you want to try out the implementation of the rule so far. I corrected the rule with a backslash after the \\, ....as you suggested before. Greetings and thanks again ( I must be converting myself as the stone on your ankle) Bert RE: problem with submitting values multiple select - Ben - Apr 23rd, 2010 Hi bvdeen, No worries! So is it working properly now? Also, which form field is it? Ben RE: problem with submitting values multiple select - bvdveen - Apr 24th, 2010 Hi Ben! No it is not working ... The formfield is the one mentioned in this thread: Quote:<div id="col4" class="col4">[/quote] http://www.bvdveen.com/hortivorm/werktijden.html Click on the first item in the menu...VUILAFVOER The first field in the changing panel (at the most right) is the field we are talking about all the time.... Greetings Bert RE: problem with submitting values multiple select - Ben - Apr 24th, 2010 Thanks Bert. One more tweak! This isn't quite right: Code: rules.push("reg_exp,aantal_groen,^\s*[0-9\\,\]{1,4}\s*$,i,alleen cijfers en komma!"); Remove the \ before the closing ] bracket, like so: Code: rules.push("reg_exp,aantal_groen,^\s*[0-9\\,]{1,4}\s*$,i,alleen cijfers en komma!"); Try that. We'll get there eventually. ;-) - Ben RE: problem with submitting values multiple select - bvdveen - Apr 24th, 2010 (Apr 24th, 2010, 9:00 AM)Ben Wrote: Thanks Bert. Dear Ben, It still doesn't work ... I copied and pasted your rule in the document.. check it online: http://www.bvdveen.com/hortivorm/werktijden.html regards, Bert |