Buy Now
Sign in

problem custom code

thesamu , February 10 2012
T
thesamu 9
February 10 2012 #266657
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 63.3
February 10 2012 #266658
Hi thesamu,

Where is $a defined?

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
T
thesamu 9
February 10 2012 #266668
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
T
thesamu 9
February 10 2012 #266681
in other words, how can i call back data from the database so i can be able to read it
GreyHead 63.3
February 10 2012 #266688
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
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
T
thesamu 9
February 11 2012 #266751
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 63.3
February 13 2012 #266815
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
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much