Hi,
I have a table which lists records. I have a column called notes where I was able to replace the value with a textarea field with the value within it - this works fine. (eventually I want to make the data updatable)
I have done the same with a checkbox. I have a column of checkboxes (check to mark as completed) in the DB the column is filled with 0's and 1's. 1 equals completed.
The values seem to be being brought in to the checkboxes OK but they are not displaying as checked.
In the checkbox I have
Name = completed[{var:ListIssues.row.Issues.cckey}]
Value = {var:ListIssues.row.Issues.completed}
Do I need to write some jquery that says if value is 1 checkbox = checked, or should it be checked by default?
Oh, I also don't understand what the Enable Ghost is for - is there an explanation somewhere?
Thanks in advance
Regards
Hi ctrlmedia,
How do you know the value is passed correctly ? try to add this in the checkbox label:
{var:ListIssues.row.Issues.completed}
Does it show 1 ? if it does then I will need to check the page.
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
Thanks for the quick response.
Yeah they all have zero apart from the ones I want to be checked where they are 1's (but not checked)
I will PM you the page?
Regards
Mark
Hi ctrlmedia,
Ok, this will need a workaround in order to get the box checked.
In your checkbox "Extra attributes", please write this:
{fn:php_fn_name}
You will then need to create a PHP function and name it "php_fn_name" (or whatever).
In this function please use this code:
if($this->get("ListIssues.row.Issues.completed")){
echo "checked";
}
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Another note, the value of the checkbox should be set to "1", it should not change.
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
HI Max,
I have set the value to 1.
I have created the php function and added it to the "extra attributes" box but it is not working.
Looking at the source it adds {fn="php_fn_name}" to the input.
Thanks for helping.
Hi ctrlmedia,
it should be : not =
{fn:php_fn_name}
And "php_fn_name" should be the name of the php function.
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
That is what I have put in but that is not what is being shown when I view the source code.
(although 'checked' is what should appear)
I have added images to better describe.
Regards
Hi ctrlmedia,
And what is the name of your php function ?
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
php_fn_name - image attached.
Regards
Hi ctrlmedia,
Ok, please send me a message using the Contact us page to get a patch file to test this.
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
I have just done this.
Regards
Mark
Hi Mark,
Just sent it!
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
That seems to have done the trick Max.
Was it an issue with the way it output the extra attribute function?
Regards
Hi Mark,
Yes, that's the most updated file and should be included in the new update.
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.