Hey Bob,
A while back you gave some code for v4 to highlight request field titles in red and also put a red line in the field's input. This is the code that was used, is there similar method in V5? I assume there is, but field names have changed?
JavaScript:
[code]window.addEvent('domready', function() {
var required, cl, inputs, input, label, type, name, skip, marker;
marker = new Element('span', {
html: '',
styles: {
color: 'red',
fontWeight: 'bold'
}
});
inputs = $$('div input, div select, div textarea');
required = [];
inputs.each(function(el) {
cl = el.getProperty('class');
if(cl !== null && (cl.contains("validate['required'") || cl.contains("validate['group["))) {
required.push(el);
}
});
required.each(function(el) {
el.addClass('cf_required');
skip = false;
type = el.getProperty('type');
if(type == 'radio' || type == 'checkbox') {
if(name != el.getProperty('name')) {
label = el.getParent().getParent().getFirst('label');
name = el.getProperty('name');
} else {
skip = true;
}
} else {
label = el.getParent().getFirst('label');
}
if(label && !skip) {
label.grab(marker.clone(), 'bottom');
label.addClass('cf_required');
}
});
});[/code]
CSS:
IE, see this website that I've used this on: http://jwjeep.com/parts-finder
2nd questions. In v4, after a submit in the "others" field there was a redirect option that can send the user to a Joomla article. I can't seem to find the corresponding method in V5. Edit: Nevermind, I see I had to go into Advanced mode and there's a Redirect option under Utilities to drag in the events options.๐
And finally.. I'm redoing this website's form from scratch on V5 (V4 import did not work,oh well), but also moving it to my cpanel platform. When the captcha field is displayed all it shows is a broken image. I'm suspecting I need to rebuild cpanel's webserver with a php extension/add-on, what lib is required for the captcha or is there a plugin I'm missing?
A while back you gave some code for v4 to highlight request field titles in red and also put a red line in the field's input. This is the code that was used, is there similar method in V5? I assume there is, but field names have changed?
JavaScript:
[code]window.addEvent('domready', function() {
var required, cl, inputs, input, label, type, name, skip, marker;
marker = new Element('span', {
html: '',
styles: {
color: 'red',
fontWeight: 'bold'
}
});
inputs = $$('div input, div select, div textarea');
required = [];
inputs.each(function(el) {
cl = el.getProperty('class');
if(cl !== null && (cl.contains("validate['required'") || cl.contains("validate['group["))) {
required.push(el);
}
});
required.each(function(el) {
el.addClass('cf_required');
skip = false;
type = el.getProperty('type');
if(type == 'radio' || type == 'checkbox') {
if(name != el.getProperty('name')) {
label = el.getParent().getParent().getFirst('label');
name = el.getProperty('name');
} else {
skip = true;
}
} else {
label = el.getParent().getFirst('label');
}
if(label && !skip) {
label.grab(marker.clone(), 'bottom');
label.addClass('cf_required');
}
});
});[/code]
CSS:
label.cf_required {
color: red;
}
input.cf_required, select.cf_required, textarea.cf_required {
border-left: 6px solid red;
}
IE, see this website that I've used this on: http://jwjeep.com/parts-finder
2nd questions. In v4, after a submit in the "others" field there was a redirect option that can send the user to a Joomla article. I can't seem to find the corresponding method in V5. Edit: Nevermind, I see I had to go into Advanced mode and there's a Redirect option under Utilities to drag in the events options.๐
And finally.. I'm redoing this website's form from scratch on V5 (V4 import did not work,oh well), but also moving it to my cpanel platform. When the captcha field is displayed all it shows is a broken image. I'm suspecting I need to rebuild cpanel's webserver with a php extension/add-on, what lib is required for the captcha or is there a plugin I'm missing?