Topic RSS
Related Topics
5:13 pm
I need to create a radio button called "other" that allows the user to add a new option using cforms14.5 and worpress 3.4.1. This is the case:
Q. Your favourite colour is..
- ( ) red
- ( ) blue
- ( ) other [specify]
I have read in the forum that this can be made by creating dynamic forms -but i have no idea how to do it and the help section is quite difficult for a newbie -. Does anyone knows about a step-by-step tutorial??
Thanks in advance!
12:13 pm
I've just found how to solve it…The code -based on "http://www.deliciousdays.com/cforms-forum/troubleshooting/tutorial-select-box-selection-shows-hidden-fields/#p19866" for showing-up the textfield is the following:
————
$(document).ready(function() {
$.viewMap = {
'0' : $([]),
'OTRO' : $('#id_of_the_textfied'),
};
$.each($.viewMap, function() { this.hide(); });
$('#id_of_the_radiobutton_other').change(function() {
$.each($.viewMap, function() { this.hide(); });
$.viewMap[$(this).val()].show();
});
————
Now i'm trying to create a function that checks that if "other" is checked and "textarea" is empty returns an "pop-up error message" and if "other" is not checked and textarea is not empty returns other "pop-up error message".
Im beginning w/ my_cforms_action() but i think i'm not in the right direction. Any suggestions??
Thanks in advance.
Most Users Ever Online: 959
Currently Online:
48 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
tracedef: 43
mores: 21
Gyrus: 20
frozenwaste: 18
asuffredini: 15
photoworks: 14
Member Stats:
Guest Posters: 3553
Members: 1464
Moderators: 3
Admins: 1
Forum Stats:
Groups: 1
Forums: 4
Topics: 5160
Posts: 18393
Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass
Moderators: Paul (421), cnymike (8), sonika (95)
Administrators: Oliver (6398)
FAQs
Home
Add Reply
Add Topic
Quote










