Login Retreive lost passwordRegister
Search

Forum Index / General / dbSelectField doesnt work with html in keyfield

[ This topic is solved ]

  haste 15 March 10 / 22:50  
I'm using two dbSelectFields in my script to get header and footer information.

<?php

$form
->dbSelectField("Header Logo""header_logo""marketing_headers", array ("h_image""h_name"), 'ORDER BY `h_name`'FH_NOT_EMPTY);
$form->dbSelectField("Footers""footers""marketing_footers", array ("f_text""f_name"), 'ORDER BY `f_name`'FH_NOT_EMPTY);

?>


Both work well, but when I'm using a html code in the footer for an unsubscribe link it's not working well. It takes information out of the keyfield and show it in the valuefield.

It looks like this:

http://www.haste.nl/fherror.jpg

What can I do about this?

Thanks!

  Johan Wiegel (Admin) 16 March 10 / 07:38  
I would say study the source of the page, I think there is a problem with escaping values and options

  haste 16 March 10 / 08:10  
I'm not sure what you mean. The error shows up in a FH form and exactly the same information source without an email link works fine.

Then it shows the keyfield 'Default' that's assigned to it and not a part of the sourcefield.

  Johan Wiegel (Admin) 16 March 10 / 08:14  
That's why I think there is a ' or a " missing some where.

The best way to find out is study the source of the page in your browser.

Can we see the form somewhere?

(Besides we think there shouldn't be html in the key of a selectfield)

  haste 16 March 10 / 08:39  
I understand what you're saying now. I've made the mistake with the HTML. I've used " that made it crash. Now I'm using a ' instead which solved the problem.

Is this the proper way to deal with it?
I'm using the dbSelectField to select different headers and footers for mailing. They footers contain HTML with mailto function to unsubscribe. If you have other recommendations to work with this, then please advice.

Thanks!

  Johan Wiegel (Admin) 16 March 10 / 08:44  
I would use indexes as key for the different header and footer and get the html when creating the mail.

  Top


powered by PHP-GLOBE   © 2004 - 2012 FormHandler. All rights reserved.   -   Open source license