Need php code to display checkbox output
I have installed Chronoform v5 component to create a form for my Joomla site. For example My Checkbox group e.g, has following values:
Suppose if any user Checks two items i.e, Bad and Average, the format in which it should save in database should be like: label:mesaage as Yes(if checked) or -(if not checked)
Review: Good: –
In short it should display all checkbox values but should display ‘Yes’ in front of the value selected by user. Is it possible?? Any suggestions?
It sounds like you want someone to write the whole back-end for you? We don't usually do that, at least, not for free!!! If you have some code you've written and have a problem, we can often help.
One thing you'll need to remember is that checkboxes only get sent to the server if they care checked, so when setting the values to be saved in the DB, you'll need to use something like isset() to determine if the box was checked, e.g.:
// field_name checkbox was checked, so handle accordingly
// it was not checked, so store whatever you want in that case
isset($_POST['Services']) ? 'Yes' : 'No'; is the code i am using. The issue is actually not with the code. I am confused as to where to place this piece of code into chronoforms which is a component in Joomla for forms. I want to place this code in order to get the desired result format.
That I cannot help out with, then, since I've never used Joomla nor Chronoforms. If you've not already done so, you might want to check for any user forums on their respective web sites, as that will probably increase your chances of finding someone with the exact experience/knowledge you need.
Originally Posted by poojah12
Thnk you anwez
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread