Author |
Topic |
|
WMS
Starting Member
3 Posts |
Posted - October 15 2008 : 07:57:21
|
Hi,
I've been trying to incorporate a form in one of my sites, which has worked flawless however, there is an error on top of the page when I'm loading it:
---------------
Get Your Free Catalog
Field 17 not in database
Other text etc etc
---------------
I suspect this is caused because the first name of the form is:
<input type="text" name="CustomFields[17]" id="CustomFields_17_1" value="">
I'm guessing VPASP tries to replace the [17] when processing the template and/or the translations in the site?
The most obvious solution would be to rename the field to a different name with [ ], but that's not an option.
How can I make sure that the error doesn't appear in when loading the page? |
|
WMS
Starting Member
3 Posts |
Posted - October 21 2008 : 07:27:04
|
Anybody has any idea? |
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - October 21 2008 : 09:06:32
|
Yes if the page that is loading includes a template then this will be what's causing the problem. The template is trying to display [17] just like [catalogid] in the products template. You shouldn't need to include the square brackets in the name of the text field.
Regards,
Carrol www.deanston-electrical.co.uk |
|
|
WMS
Starting Member
3 Posts |
Posted - October 21 2008 : 09:09:33
|
That I do understand, but I can't change to not-using the square brackets. I need to find a way to (temporarily) disable using templates for this page. |
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
|
Admiral The X
VP-CART New User
USA
52 Posts |
Posted - April 04 2009 : 17:42:57
|
better late than never but...
if you are willing to use java this may help...
I have a similar situation where i need square brackets to make bulletin board code [img] http:// type stuff, to accomplish this i used Javascript
first i define the piece of code i need to have the square brackets in inside of the tmp_product javascript header area as a java variable yourstring= "{url=" + location.href + "}{img" + "}http://www.yoursite.com/shopping/" + tmpimg + "{/img" + "}{" + "/url}";
then for each instance of { i run the following code to apply an open square bracket yourstring= yourstring.replace(/{/,String.fromCharCode(91));
and this to apply the close square bracket yourstring= yourstring.replace(/}/,String.fromCharCode(93));
this code executes character replacement per execution so for example in my case i need to perform a loop to replace all the curly braces with square brackets.
in your particular case your addressing the "name" field... which i'm hoping is not the field java uses to identify HTML tags. i hope it uses the ID field, but I cant recall these small details - too many languages per day. start to get lost, lol.
Air Armory - Airsoft http://www.AirArmory.com - shop http://sitrep.airarmory.com - news |
|
|
|
Topic |
|