ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

problem custom code

thesamu 10 Feb, 2012
hello guys
I have a problem, using the "custom code" can not figure out how to retrieve data

The code I use is as follows:

<div class="ccms_form_element cfdiv_text"
 id="autoID-ca1bd44f22f4a8879d4f5427e8c244a5_container_div">
<label>Cognome:</label>
{echo .$a['ris_cognome']."}
<div class="clear"></div>
<div id="error-message-ris_cognome"></div>
</div>
GreyHead 10 Feb, 2012
Hi thesamu,

Where is $a defined?

Bob
thesamu 10 Feb, 2012
I don't know, actually, since I do not know the php very well: i found an exemple of it from a website.
How can I extrcat an element from a Data base with a classic view? the element name is ris_nome and the database is called ris_risorse
thesamu 10 Feb, 2012
in other words, how can i call back data from the database so i can be able to read it
GreyHead 10 Feb, 2012
Hi thesamu,

You can't expect to get random pieces of code and expect them to work. Nor do we have time to run coding tutorials here.

If you can explain what you need to do with your form we may be able to help.

Bob
thesamu 11 Feb, 2012
I will try to let you understand clearly, transposing the more possibily number of datas On Load DB Record Loader and configuring it in this way
DB Feld: cf_id
Table: ris_risorse
Request Param: rec
Load Filds: yes
Curly Replacer: yes
Model ID:
Load Under Model ID: no
WHERE satement:
Array Felds Sets:
Array Separators:

in db ris_risorse I have a field called ris_nome and inside it there is the data: lukeand another field called ris_cognome and inside it there is the data: skywalker

what kind of php or html code I have to write inside custom code so that in Frontend View I can see something like this:

Nome: Luke
last name: skywalker
GreyHead 13 Feb, 2012
Hi thesamu,

If you have the DB Record Loader in the On Load event before the Show HTML action then it will automatically set the values of inputs with the names ris_nome or ris_cognome

If you just want to display the values then set the Curly Replacer to Yes in the Show HTML action configuration and add {ris_nome} and {ris_cognome} in a Custom Element element or elements in your form.

Bob
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com