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.

eZ debug

Timing: Jan 31 2025 09:37:24
Script start
Timing: Jan 31 2025 09:37:24
Module start 'layout'
Timing: Jan 31 2025 09:37:24
Module start 'content'
Timing: Jan 31 2025 09:37:24
Module end 'content'
Timing: Jan 31 2025 09:37:24
Script end

Main resources:

Total runtime0.0298 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.2656151.2266
Module start 'layout' 0.00560.0030 739.492236.6797
Module start 'content' 0.00860.0196 776.171990.1875
Module end 'content' 0.02820.0016 866.359433.9922
Script end 0.0298  900.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00258.4729140.0002
Check MTime0.00123.8682140.0001
Mysql Total
Database connection0.00051.653810.0005
Mysqli_queries0.003612.061330.0012
Looping result0.00000.043210.0000
Template Total0.00123.910.0012
Template load0.00092.884610.0009
Template processing0.00031.010010.0003
Override
Cache load0.00062.049710.0006
General
dbfile0.008829.683780.0011
String conversion0.00000.027240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs