Forums

[SOLVED] extract value from table created with ChronoForms

gianfrancocaliri 23 Dec, 2012
Hello,
I'm going crazy: :? I would like to put an article in the value of a field in a table, but I can not extract it with db record loader. 😟
I put in DB Field "cf_id" in table "table name" and Request Param "oro24kt" (the name of the field that I want to display) and: TADAAA! .... nothing! 😲
I can extract all the fields with DB Multi Record Loader, but I need a single value at a time without the table that creates the DB Multi Record loader, only the number in the field.
A little help, please?
GreyHead 23 Dec, 2012
Hi gianfrancocaliri,

I'm confused, please try giving a bit more detail about exactly what you are trying to do here?

I think that the Request Parameter should have the name of the column which has the cf_id value. But I don't see where that value is coming from. How do you identify the record that you want to read?

Bob
gianfrancocaliri 23 Dec, 2012

I'm sorry, I try to explain better:
in my article I would like to put the word "ORO 24k to gr" + value + "€", where value is 37.25 which I highlighted with a red oval ...
That is, I would like to read my article "GOLD 24K to gr. € 37.25"
You are very kind, thank you very much right now.
GreyHead 24 Dec, 2012
Hi gianfrancocaliri,

I'm still confused.

If you are using a DB Record Loader to get these values then ChronoForms will add them to the $form->data array.

Then you can use either add this to the code you are displaying
"ORO 24k to gr {oro24kt} €"
or you can define a new variable in a Custom Code action
<?php
$form->data['oro24k_text'] = "ORO 24k to gr {$form->data['oro24k']} €";
?>
and use {oro24k_text} where you want to display the text.

Bob
gianfrancocaliri 26 Dec, 2012
thanks for the reply, but I'm afraid of having to abuse your patience, because I did not understand ... 😟
I created my form and put "db record loader" in events, "on load". Is this right?
then I put the code (<? php
$ form-> data ['oro24k_text'] = "ORO 24k to gr {$ form-> data ['oro24k']} €";
?>) to a "custom code" in "on record found" or outside, before (after?) "on load"?
... and, in the end, I have to "show html"?
finally "{oro24k_text}": I put it directly into the article of joomla?
(I warned you that I am at least beginner, sorry ...)
GreyHead 27 Dec, 2012
Hi gianfrancocaliri,

If you can explain clearly what you want to do I may be able to help more. At present I am just confused. I do understand that writing in English probably doesn't make it easier for you.

Bob
gianfrancocaliri 28 Dec, 2012
I found out where and how to enter the code that you had given me.
thank you very much! 😀
I think that soon I'll ask you another little help. (not a threat!) :mrgreen:
See you soon!
gianfranco
This topic is locked and no more replies can be posted.