Hello friends, This must be something very simple but i could not locate the exact piece of code for any reference while browsing several topics. I dont want to do this through any PHP code since it must be something simple to acheive in Chronoforms i believe, looking at the options/rich-features that it gives.
Here is my requirement:
I have created a simple form, and a simple backend DB(MySQL) as well.
I want the table records to be dynamically populated as a list. I am using a model (Attendance).
Model_ID : Attendance, Form name : Attendance.
Qn: How do i show the value of these array fields as a list ?
I used a simple "textbox" , gave pretty much most values like "$form->data['cf_name']" OR Attendance.cf_name OR Attendance['cf_name'] nothing really shows the data.
I am missing something very simple i know. please help.
Qn: Can you help what must be given to the textbox options to these fields(refer screenshot)?
[attachment=0]1.png[/attachment]
Here is what the debugger say :
Data Array:
Array
(
[option] => com_chronoforms
[tmpl] => component
[chronoform] => Attendance
)
Validation Errors:
Array
(
)
Data Array:
Array
(
[option] => com_chronoforms
[tmpl] => component
[chronoform] => Attendance
[attendance] => Array
(
[0] => Array
(
[cf_name] => Shravan
[cf_attended] => 1
)
[1] => Array
(
[cf_name] =>
[cf_attended] => 0
)
[2] => Array
(
[cf_name] =>
[cf_attended] => 0
)
)
)
Validation Errors:
Array
(
)
Thanks
PK
Here is my requirement:
I have created a simple form, and a simple backend DB(MySQL) as well.
I want the table records to be dynamically populated as a list. I am using a model (Attendance).
Model_ID : Attendance, Form name : Attendance.
Qn: How do i show the value of these array fields as a list ?
I used a simple "textbox" , gave pretty much most values like "$form->data['cf_name']" OR Attendance.cf_name OR Attendance['cf_name'] nothing really shows the data.
I am missing something very simple i know. please help.
Qn: Can you help what must be given to the textbox options to these fields(refer screenshot)?
[attachment=0]1.png[/attachment]
Here is what the debugger say :
Data Array:
Array
(
[option] => com_chronoforms
[tmpl] => component
[chronoform] => Attendance
)
Validation Errors:
Array
(
)
Data Array:
Array
(
[option] => com_chronoforms
[tmpl] => component
[chronoform] => Attendance
[attendance] => Array
(
[0] => Array
(
[cf_name] => Shravan
[cf_attended] => 1
)
[1] => Array
(
[cf_name] =>
[cf_attended] => 0
)
[2] => Array
(
[cf_name] =>
[cf_attended] => 0
)
)
)
Validation Errors:
Array
(
)
Thanks
PK
Hi paramkrish,
To start with, in the boxes put just the name e.g. cf_name with no brackets, quotes or php stuff.
Bob
To start with, in the boxes put just the name e.g. cf_name with no brackets, quotes or php stuff.
Bob
Thanks Bob for responding. I tried that too earlier, it did not help.
It throws the same value whatever i attempt to put in it.
[attachment=0]2.png[/attachment]
What is it i am missing ?
It throws the same value whatever i attempt to put in it.
[attachment=0]2.png[/attachment]
What is it i am missing ?
Hi paramkrish,
Ths Data Displayer tab in the DB Multi Record Loader will let you display a simple list of the records.
Bob
Ths Data Displayer tab in the DB Multi Record Loader will let you display a simple list of the records.
Bob
Bob, Thanks. I am aware of the Data Displayer but i would like to print these values directly with the simple form technique.
I noticed with "single DB Record Loader" your recommendation of "cf_name" works fine.
But for the multi, how do i display the array values in the same way ? I can see the array is intact as per debugger
PK
I noticed with "single DB Record Loader" your recommendation of "cf_name" works fine.
But for the multi, how do i display the array values in the same way ? I can see the array is intact as per debugger
Array
(
[order] => cf_name
[direction] => asc
[attendance] => Array
(
[0] => Array
(
[cf_name] => Shravan
[cf_attended] => 1
)
[1] => Array
(
[cf_name] =>
[cf_attended] => 0
)
[2] => Array
(
[cf_name] =>
[cf_attended] => 0
)
)
)but just not sure how to get the value of the variables like "cf_name" etc., rather than using a php code or the data displayer. PK
This topic is locked and no more replies can be posted.
