Add a dropdown list to the Contact Us package

Author Message

Softriva .com

Tuesday 06 February 2007 10:44:37 am

I need to add a dropdown (combo) list to contact us form. What should I do? What datatype should add to the class?

OOzy

Softriva .com

Monday 26 February 2007 6:48:21 am

Any supported?

Is it actually possible to have a dropdown box (selection) in contact us form?

Ɓukasz Serwatka

Monday 26 February 2007 9:55:20 am

Hi,

Some useful topics:
http://ez.no/community/forum/setup_design/modifying_the_sender_email_in_feedback_form

http://ez.no/community/forum/developer/send_contact_form_to_selected_recipient

http://ez.no/community/forum/setup_design/how_can_i_specify_email_receiver_for_different_form/re_how_can_i_specify_email_receiver_for_differ__1

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Claudia Kosny

Monday 26 February 2007 11:13:30 am

Hi OOzy

For a dropdown box just use an ezoption type for your info collection class. If you have a look at the template \design\standard\templates\content\datatype\collect\ezoption.tpl (eZ 3.9) you can see that it displays as a selectbox anyway if you have more than 5 options. Just adapt the code to your needs.

A real combo box (a select box where you can also type in to add a value) requires an ezoption attribute and a string attribute in your info collection class. And then some fancy javascript and CSS to display both attributes as one combobox and some template code which determines which attribute was used. Not really hard to do but still some work.

Claudia

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.