Is it possible to add images to a form? I would like to create a gallery where the visitor could select an image via a checkbox.
Forums
A gallery with checkboxes
Hi cm,
You can do that using HTML in a Custom Code elements. Check though for existing gallery extensions with this feature before building your own.
Bob
You can do that using HTML in a Custom Code elements. Check though for existing gallery extensions with this feature before building your own.
Bob
Thanks, my best solution is to stay within Chronoforms and set up a series of Custom Code elements followed by a checkbox. I looked into other galley extensions and got lost. Now I have to figure out how to have the user select a specified number of choices. I think I saw that you already gave some direction on that in a forum.....I will investigate further ....just wanted to thank you for the help before I come knocking on your door again 🙂
Hi crn,
You can use custom JavaScript to limit the total; you can see a ChronoForm I built here. Here's the MooTools script that page uses - it would need rewriting in jQuery for Joomla! 3. Basically it runs a function when any checkbox is clicked, if the count is 5 or more it disables all the unchecked ones and shows a message; if it is less than 5 it enables then all and hides the message.
Bob
You can use custom JavaScript to limit the total; you can see a ChronoForm I built here. Here's the MooTools script that page uses - it would need rewriting in jQuery for Joomla! 3. Basically it runs a function when any checkbox is clicked, if the count is 5 or more it disables all the unchecked ones and shows a message; if it is less than 5 it enables then all and hides the message.
window.addEvent('domready', function() {
var files = $$('input[name^=file_select][type=checkbox]');
files.each(function(item) {
item.addEvent('click', checkCount);
});
function checkCount() {
var files_checked;
files_checked = $$('input:checked[name^=file_select][type=checkbox]');
if ( files_checked.length >= 5 ) {
$('complete').setStyle('visibility', 'visible');
files.each(function(el){
if ( el.checked !== true ) {
el.disabled = true;
}
});
} else {
$('complete').setStyle('visibility', 'hidden');
files.each(function(el){
el.disabled = false;
});
}
}
});
Bob
This topic is locked and no more replies can be posted.