Hey Guys,
I'm new to form so I'm not entirely sure of the potential of this. So I'd like to put an idea out there and hope that you can let me know if it can be done.
Currently I have a website for a Radio Controlled Airplane Club and one thing that has been a hassle in the past is knowing which frequencies everyone has in the club.
Anyone who has even been active in any radio controlled modeling will know what I mean. There is a spectrum of frequencies ranging between 11 to 60. What I would like to be able to do is for the people logged in have them be able to goto a page and check the boxes next to the frequencies that they have.
Then the database complies all the information to display totals on a separate page so that way everyone can see which frequencies aren't being used. Then give the end-user the ability to uncheck the box later and have the totals page reflect the changes.
Hopefully this can be done. If so can someone please point me in the right direction otherwise let me know if it can't.
Thank you,
Carl
Hi Carl,
This sounds to me like a ChronoForms+ChronoConnectivity question.
A few things to check though. As far as I understand it there are specifically defined channels 11, 12, 13, . . . within the range; a single user can have access to several channels but only use one at a time; you are trying to track the 'access' here (it used to be set by crystal I think) rather than the current 'channel in use'?
I'd suggest that you create a ChronoForms Form that checks the user's ID then shows an array of checkboxes corresponding to the channels (could also be a multiple drop-down). You'd use the User ID to recall and save any exisiting information.
Then in ChronoConnectivity you can create a table that aggregates all of the data by channel and displays it (one way would be a list of the Usernames by each channel - or just a count).
This needs a moderate amount of coding but isn't too difficult.
Bob
Hey Bob,
You're correct that I'd like to track the access and that users have to ability to use multiple channels but only one at a time.
I'm going to try and tackle this hurdle. I have a little knowledge about coding but I'm hoping that I can relay on this forum for additional help.
I'm going to start by creating a form. Be back soon
Carl
This didn't take long lol... How do you link the form to a user? I'm searching form to find out thought maybe someone could point me in the right direction.
Hi Carl,
Search here on 'getuser' and you'll find a few examples. Basically you load the Joomla User object from which you can get id, name, email, etc.
Bob
Hi Carl,
Hard to see how it should be so I've no idea what's getting screwed up, it doesn't look as though there is any ChronoForms CSS there though.
Bob
I tried turning off the CSSjscompress but that didn't work. I'm at a loss of what to do. I'm not sure what's forcing the checkboxes not to show. It's weird because when that page first loads you can see that boxes and check them and then as the page continues to load they disappear.
I'm not sure where you're finding the "display:none" for the roktheme this might solve it?
Hi Carl,
What happens, is that your template uses some custom Javascript to create their own appearance to checkboxes. The intended behaviour is that each checkbox input is hidden, and an image is added along with some onclick script event. Clicking the image will swap the image, and also change the state of the invisible checkbox.
As posted, I got a few javascript errors involving the function elementExtend. The elementExtend function is actually part of the LiveValidation js-library added in recent ChronoForms. I'm not sure why this breaks rockettheme's scripts though, as they're actually built on MooTools as well.
Oh wait, got it now! It's actually related to the first error message in my previous post. The elementExtend function is defined just after the "var =ChronoTips = new Class({" piece of code. Since the script execution breaks here, the elementExtend function never gets loaded, and everything breaks... This, in it's turn, is due to the JavaScript compressor in your theme in combination with the livevalidation_standalone.js don't properly terminate it's class declaration with a ;
So, to fix this, locate your livevalidation_standalone.js and open it in a text editor, locate the last line, which is simply a "}" - and add a ";" directly after it, and save the changes.
/Fredrik
Did what you said, the pictures are substituting but I can't get the check boxes to show up. Can I do a CSS override of the Rockettheme script? I'm sorry that I keep bugging you. I would really like to learn this stuff php, js etc I figure the more I do it and the more help I get I can be self-sufficient and help others. So I appreciate your input and patience. Is there a work around?
I don't really care for the picture overlay of the checkbox. I wouldn't mind the original checkboxes I'm just not sure where to go to change it.
Okay sweet I figured out the solution for this problem... In the template manager menu there was an option for Enable Input Styling which controls the Radio Buttons and Check Boxes. I disabled the feature and the boxes are showing up. Now to figure out how to tie this to users and post to a database🙂
Hi manofstyle,
I think you'll need to add GROUP BY `column_name` into the MySQL. ChronoForms doesn't offer a GROUP BY box but you can use the ORDER BY box instead. Try putting ORDER BY `channel` GROUP BY `channel` in there - but replace channel with the correct field name.
You will probably also need to add a count to get the number of records for each channel. This may require a second MySQL query inside the body box.
Bob
Hi Carl,
Nice you got the checkboxes sorted. I noticed now that your site uses cache, this might have prevented the fix to work immediately unless you cleared both Joomla's and your web-browser's caches..
I'm not sure ChronoConnectivity is the best choice for such a listing, as you can't tailor the SQL-query well enough. An illustration on your database layout would help, but I suspect this wont be a trivial query :/
Am I right to assume you've got a single column holding all checked frequencies in your database table?
/Fredrik