Hello,
I have inserted some curly brackets, {field},into the Field Default Value entry in order to load data from a table and it is pulling the info properly. However, when there is no data found it logically comes back with {field}. Is there a way to load an empty space instead of {field} when there isn't any data?
Thanks
Hi swmckay,
Which version of ChronoForms are you using? You can find the version from Site Admin | Extensions | Install/Uninstall | Components in Joomla! 1.5 or Site Admin | Extensions | Extension Manager | Manage in Joomla! 1.6.
The DB Record Loader in CFv4 should handle that case OK.
Bob
Greyhead,
Yes I am using CFv4. It loads correctly if there is data in the record but when there is no data it comes back with the Default Field Value such as {field}. Perhaps I have added it to the field when I set it up.
Hi,
Indeed this is how the curly brackets replacer works, it tries to replace the existing data array keys, it can't predict non existent ones, I suggest that you do something in the "no record found event".
Also, there is no reason you would insert curly brackets into the field default values, the values would be set automatically if there are matching data keys, and if not then they would be left empty, so the simplest answer is to remove those curly brackets strings.
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hello,
I removed the unnecessary curly bracket entries and problem solved. Thank you gentlemen!