cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Login form protected by Login LockDown.


Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
How :: DropDown List with Different Subjects to Choose From?
June 14, 2007
2:41 am
Andrew2
Guest

Welllll, First off… Cool This is the best widget I've found to date & it's been a couple years with WP my only complaint would be the constant new versions.

 Anyways, I just wanted to know how to get a dropdown list with different subjects for my site users to choose from. I thought it was the subject option so i just put subjects like I would for a drop down menu, I'm not sure about that since it doesn't exactly seem to be working.

 What is the correct method to do this?

Thanks :)

 

-a2

June 14, 2007
6:09 am
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

Welllll, First off… Cool This is the best widget I've found to date & it's been a couple years with WP my only complaint would be the constant new versions.

Did I mention that 5.0 is lurking around the corner…? No worries, after that it'll be bugfixes only for a while.

dropdown list with different subjects for my site users to choose from

The subject field type really is a regular single line input field, which gets appended to the default subject line that you can specifiy via the admin gui.

What I would suggest is to simply add a new field, e.g. drop down box (select box) with your options and include the field name as a variable in the subject line (again via the admin gui), e.g.:

new fieldYour subject#subject1#subject2#subject3

subject ("Form Admin / Email Options"): {Your subject}

**

PS: Of course you can go more fancy with:

new field: 

Subject#Please pick a subject|-#subject1#subject2#subject3

and make it "is required".  This way the user is forced to make a choice (other than the first) but won't be biased with the first entry being the default one (the '-' makes is an invalid option to choose).

June 14, 2007
10:02 pm
Andrew2
Guest

Alright, I tried it but I'm not sure if you understood that I wanted the users to be able to select the Subject for their Email? Such as "feedback", "business", "errors" ect. It would show up as the subject when I go into my inbox rather than appearing as an option called subject inside of the email message itself. :) Thanks

June 14, 2007
10:49 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

I think I understood you correctly.

subject ("Form Admin / Email Options"): {Your subject}

Will make sure it's in emails subject (well, and in the body since it's part of the complete form data). With v5.0 to be released soon, however, you'll have full control over what actually can/should go into the body of the email as well, so you could omit certain fields.

so you'll have two options a) include all form data or b) determine yourself by using the custom variables what goes into the email to the admin & the user (if cc'ed) 

June 16, 2007
4:10 am
Andrew2
Guest

Sorry, I don't know where I'm supposed to put :

subject ("Form Admin / Email Options"): {Your subject} ?

I'm not familiar with any other settings or edits I am allowed with cforms, I've only created a form and used the simple admin tools and the code above doesn't seem to be legitimate for the form options. Laughing

June 16, 2007
8:50 am
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

On  the main cforms admin page ("cforms"), find the config section "Form Admin / Email Options", which allows you to set certain options important for mail delivery. In that secion you'll have an option called "subject" (3rd from top)  which usually has a default value of "A comment from a site visitor".

Now this you can change to, e.g.: "The visitor chose {Your subject}"

Provided, you have setup a field with the field name "Your subject" …

 

June 16, 2007
11:55 am
Andrew2
Guest

And last but not least… How do I set up names for the fields (in your last part)?

 Thank you very much for not turning into the hulk :)

June 16, 2007
12:30 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

Andrew, please see the Help! section in the plugin it describes in detail all the supported input fields and the field name formats expected, with examples. If that doesn't help, please check the comprehensive form example (comprehensive-demo-form.txt) I've included in the /styling directory and use the RESTORE feature to upload this backup file which will give you a direct example of what cforms can do.

January 14, 2008
5:49 pm
Anna
Guest

Hi, thanks for this great plugin!

I am so new to this, so I dont even know if the previous discussion about drop boxes is the answer to what I am looking for.

I would like the use to be able to choose one of 11 categories in a drop down box, but when hovering over one of the options, another drop box would provide a list of types to choose from (I have over 100 options, all listed on our website). This is very much how Windows works when we click Start and then get a list of Programs, Documents, Settings, etc and from them we can choose what we really want.

Of course I would like both the category and the type to be recorded in the form output.

If this doesnt work, I think I could do two dropboxes. With so many options for the second (type) I would like to separate the options either by color (like what I found at html goodies) or by a space or - – - - between the types that belong to different categories.

Is this the solution?Subject#Please pick a subject|-#subject1#subject2#subject3 Subject#Please pick a subject|-#subject1#subject2#subject3

Thanks for shedding any light on this!

January 14, 2008
8:00 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

Dynamically changing drop down boxes are not supported.

However, you can add '———-' seperators and give them a value of "-" this way they don't qualify as a real answer (if this drop down box is made 'required').

You could also use   (non-beaking spaces) that could add some structuring to your list, e.g.:

item1
   item1.1
   ——-
   item1.2
item2
   item2.1

String:

Select#item1|val1#
   item1.1|val1.1#
   ———|-#
   item1.2|val1.2#
item2|val2#…

 


EDIT: Sorry the above   is currently not working as they get printed as such…I'll fix this in the next release and can send you an interims patch if you like…

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
27 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: 3739

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5339

Posts: 18706

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)