Formvariables name matching
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 63567
interpreted = N
texte = How does formvariables match by name?In one case I have formvariables name=1_vendorname and in another I have name=_1_vendorname.I can't understand why the first one fails but the second works. Does the formvariables with an inexact match match in the middle of the name rather than at the start?--------------Sample code------------This works as expected:[showif submit=[submit]][formvariables name=sku_&exact=F]SKU=[text show=T]keyfieldsku=[value][/text]
[formvariables name=_[value]_&exact=F][grep search=^_[keyfieldsku]_&replace=][NAME]:[/grep]=[value]
[/formvariables]
[/formvariables][/showif]Example output for above code:SKU=1VENDORNAME:=This is the name of vendor1VENDORADDRESS:=This is the address of vendor1SKU=2VENDORNAME:=This is the name of vendor2VENDORADDRESS:=This is the address of vendor2This does not work as expected (I have changed the form to remove the _ at the front of the var name.):[showif submit=[submit]][formvariables name=sku_&exact=F]SKU=[text show=T]keyfieldsku=[value][/text]
[formvariables name=[value]_&exact=F][grep search=^[keyfieldsku]_&replace=][NAME]:[/grep]=[value]
[/formvariables]
[/formvariables][/showif]Example output:SKU=1VENDORNAME:=This is the name of vendor1VENDORADDRESS:=This is the address of vendor121_VENDORNAME:=This is the name of vendor2121_VENDORADDRESS:=This is the address of vendor2131_VENDORNAME:=This is the name of vendor3131_VENDORADDRESS:=This is the address of vendor31-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
How does formvariables match by name?In one case I have formvariables name=1_vendorname and in another I have name=_1_vendorname.I can't understand why the first one fails but the second works. Does the formvariables with an inexact match match in the middle of the name rather than at the start?--------------Sample code------------This works as expected:[showif submit=[submit]][formvariables name=sku_&exact=F]SKU=[text show=T]keyfieldsku=[value][/text]
[formvariables name=_[value]_&exact=F][grep search=^_[keyfieldsku]_&replace=][NAME]:[/grep]=[value]
[/formvariables]
[/formvariables][/showif]Example output for above code:SKU=1VENDORNAME:=This is the name of vendor1VENDORADDRESS:=This is the address of vendor1SKU=2VENDORNAME:=This is the name of vendor2VENDORADDRESS:=This is the address of vendor2This does not work as expected (I have changed the form to remove the _ at the front of the var name.):[showif submit=[submit]][formvariables name=sku_&exact=F]SKU=[text show=T]keyfieldsku=[value][/text]
[formvariables name=[value]_&exact=F][grep search=^[keyfieldsku]_&replace=][NAME]:[/grep]=[value]
[/formvariables]
[/formvariables][/showif]Example output:SKU=1VENDORNAME:=This is the name of vendor1VENDORADDRESS:=This is the address of vendor121_VENDORNAME:=This is the name of vendor2121_VENDORADDRESS:=This is the address of vendor2131_VENDORNAME:=This is the name of vendor3131_VENDORADDRESS:=This is the address of vendor31-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
William DeVaul
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Clickable maps and WebCatalog? (1996)
WebCommerce: Folder organization ? (1997)
WebCat2b13MacPlugin - [math][date][/math] problem (1997)
Multiple catalog databases and showcart (1997)
Text data with spaces in them... (1997)
[OT] Bad Cookie / Internet Option / Internet Explorer (2004)
Wanted: More Math Functions (or, Can You Solve This?) (1997)
RAM variables (1997)
Search Questions (2000)
Error Lob.db records error message not name (1997)
[protect] on NT? (1997)
Music in background (2000)
[WebDNA] PayPal Instant Payment Notification Guide (2009)
ShipCosts database (1997)
HELP WITH DATES (1997)
[OT] Industry news from Australia (2000)
Webcat Manual and TeaRoom Examples Uses Different Examples. (1997)
Multi-User Security on *nix using mod_rewrite (2002)
linetiems in thankyou.tpl (1997)
Web Site Stats (2002)