I have designed a website in Adobe Muse. I have an order form that has options to select an item from a drop down list, which has its own price, and then after all items are selected a total is generated.
Heres the code that i have and just need the calculate section of the code and JavaScript if possible:
<form name=myform>
<select name=mytextarea>
<option name=one value=one> </option>
<option name=two value=two> Standard Digital </option>
<option name=three value=three> Matte Laminated </option>
</select>
</form>
<form name=myform>
<select name=mytextarea>
<option name=one value=one> </option>
<option name=two value=two> 5.5mm x 5.5mm </option>
<option name=three value=three> 8.5mm x 5.5mm </option>
<option name=four value=four> 9.0mm x 5.0mm </option>
</select>
</form>
<form name=myform>
<select name=mytextarea>
<option name=one value=one> </option>
<option name=two value=two> 125 </option>
<option name=three value=three> 250 </option>
<option name=four value=four> 500 </option>
</select>
</form>
<form name=myform>
<select name=mytextarea>
<option name=one value=one> </option>
<option name=two value=two> Same Day Collection</option>
<option name=three value=three> Delivery (+ £10)</option>
</select>
</form>
so for each option i need a price to generate and then after all options have been selected, a total should be generated.
Right my thoughts on this are that you would be better to use PHP to do this and then use an
<iframe> </iframe>
Place this is Muse from selecting Object > insert HTML
PHP is very good for this and there are plenty of bits you can find online to get it done.
That's what I would do if it was me.
Cheers
Related
I want to add coupons on my live site but before I do that I am testing the coupons on my sandbox. I have created coupons in the 2checkout admin area. According to the documentation, a customer enters the coupon code after being redirected to the 2checkout site. However, I only see the pop up but i don't see any area to enter coupon code.What gives?
<form class="form-horizontal form" action="<?php echo $action;?>" method="post">
<div class="panel panel-primary">
<div class="panel-heading"><strong>BILLING INFORMATION</strong></div>
<div class="panel-body">
<div class="form-group required">
<label class="col-md-2">Country</label>
<div class="col-md-10">
<select id="country" class="form-control" name="country" autocomplete="on" required="">
<option value="" class="ng-binding">- Choose Country -</option>
<option value="USA">United States</option>
<option value="GBR">United Kingdom</option>
<option value="CAN">Canada</option>
<option value="AUS">Australia</option>
<option disabled="" value="—">—</option>
<option value="ALA">Åland Islands</option>
<option value="AFG">Afghanistan</option>
<option value="ALB">Albania</option>
<option value="DZA">Algeria</option>
<option value="ASM">American Samoa</option>
<option value="AND">Andorra</option>
<option value="AGO">Angola</option>
<option value="AIA">Anguilla</option>
<option value="ATA">Antarctica</option>
<option value="ATG">Antigua and Barbuda</option>
<option value="ARG">Argentina</option>
<option value="ARM">Armenia</option>
<option value="ABW">Aruba</option>
<option value="AUS">Australia</option>
<option value="AUT">Austria</option>
<option value="AZE">Azerbaijan</option>
<option value="BHS">Bahamas</option>
<option value="BHR">Bahrain</option>
<option value="BGD">Bangladesh</option>
<option value="BRB">Barbados</option>
<option value="BLR">Belarus</option>
<option value="BEL">Belgium</option>
<option value="BLZ">Belize</option>
<option value="BEN">Benin</option>
<option value="BMU">Bermuda</option>
<option value="BTN">Bhutan</option>
<option value="BOL">Bolivia</option>
<option value="BES">Bonaire, Sint Eustatius and Saba</option>
<option value="BIH">Bosnia and Herzegovina</option>
<option value="BWA">Botswana</option>
<option value="BVT">Bouvet Island</option>
<option value="BRA">Brazil</option>
<option value="IOT">British Indian Ocean Territory</option>
<option value="BRN">Brunei Darussalam</option>
<option value="BGR">Bulgaria</option>
<option value="BFA">Burkina Faso</option>
<option value="BDI">Burundi</option>
<option value="KHM">Cambodia</option>
<option value="CMR">Cameroon</option>
<option value="CAN">Canada</option>
<option value="CPV">Cape Verde</option>
<option value="CYM">Cayman Islands</option>
<option value="CAF">Central African Republic</option>
<option value="TCD">Chad</option>
<option value="CHL">Chile</option>
<option value="CHN">China</option>
<option value="CXR">Christmas Island</option>
<option value="CCK">Cocos (Keeling) Islands</option>
<option value="COL">Colombia</option>
<option value="COM">Comoros</option>
<option value="COG">Congo</option>
<option value="COD">Congo, the Democratic Republic of the</option>
<option value="COK">Cook Islands</option>
<option value="CRI">Costa Rica</option>
<option value="CIV">Cote D'ivoire</option>
<option value="HRV">Croatia (Hrvatska)</option>
<option value="CYP">Cyprus</option>
<option value="CZE">Czech Republic</option>
<option value="DNK">Denmark</option>
<option value="DJI">Djibouti</option>
<option value="DMA">Dominica</option>
<option value="DOM">Dominican Republic</option>
<option value="ECU">Ecuador</option>
<option value="EGY">Egypt</option>
<option value="SLV">El Salvador</option>
<option value="GNQ">Equatorial Guinea</option>
<option value="ERI">Eritrea</option>
<option value="EST">Estonia</option>
<option value="ETH">Ethiopia</option>
<option value="FLK">Falkland Islands (Malvinas)</option>
<option value="FRO">Faroe Islands</option>
<option value="FJI">Fiji</option>
<option value="FIN">Finland</option>
<option value="FRA">France</option>
<option value="FXX">France, Metropolitan</option>
<option value="GUF">French Guiana</option>
<option value="PYF">French Polynesia</option>
<option value="ATF">French Southern Territories</option>
<option value="GAB">Gabon</option>
<option value="GMB">Gambia</option>
<option value="GEO">Georgia</option>
<option value="DEU">Germany</option>
<option value="GHA">Ghana</option>
<option value="GIB">Gibraltar</option>
<option value="GRC">Greece</option>
<option value="GRL">Greenland</option>
<option value="GRD">Grenada</option>
<option value="GLP">Guadeloupe</option>
<option value="GUM">Guam</option>
<option value="GTM">Guatemala</option>
<option value="GGY">Guernsey</option>
<option value="GIN">Guinea</option>
<option value="GNB">Guinea-Bissau</option>
<option value="GUY">Guyana</option>
<option value="HTI">Haiti</option>
<option value="HMD">Heard Island and Mcdonald Islands</option>
<option value="HND">Honduras</option>
<option value="HKG">Hong Kong</option>
<option value="HUN">Hungary</option>
<option value="ISL">Iceland</option>
<option value="IND">India</option>
<option value="IDN">Indonesia</option>
<option value="IRQ">Iraq</option>
<option value="IRL">Ireland</option>
<option value="IMN">Isle of Man</option>
<option value="ISR">Israel</option>
<option value="ITA">Italy</option>
<option value="JAM">Jamaica</option>
<option value="JPN">Japan</option>
<option value="JEY">Jersey</option>
<option value="JOR">Jordan</option>
<option value="KAZ">Kazakhstan</option>
<option value="KEN">Kenya</option>
<option value="KIR">Kiribati</option>
<option value="KOR">Korea, Republic of</option>
<option value="UNK">UNK</option>
<option value="KWT">Kuwait</option>
<option value="KGZ">Kyrgyzstan</option>
<option value="LAO">Lao People's Democratic Republic</option>
<option value="LVA">Latvia</option>
<option value="LBN">Lebanon</option>
<option value="LSO">Lesotho</option>
<option value="LBR">Liberia</option>
<option value="LBY">Libyan Arab Jamahiriya</option>
<option value="LIE">Liechtenstein</option>
<option value="LTU">Lithuania</option>
<option value="LUX">Luxembourg</option>
<option value="MAC">Macao</option>
<option value="MKD">Macedonia</option>
<option value="MDG">Madagascar</option>
<option value="MWI">Malawi</option>
<option value="MYS">Malaysia</option>
<option value="MDV">Maldives</option>
<option value="MLI">Mali</option>
<option value="MLT">Malta</option>
<option value="MHL">Marshall Islands</option>
<option value="MTQ">Martinique</option>
<option value="MRT">Mauritania</option>
<option value="MUS">Mauritius</option>
<option value="MYT">Mayotte</option>
<option value="MEX">Mexico</option>
<option value="FSM">Micronesia, Federated States of</option>
<option value="MDA">Moldova, Republic of</option>
<option value="MCO">Monaco</option>
<option value="MNG">Mongolia</option>
<option value="MNE">Montenegro</option>
<option value="MSR">Montserrat</option>
<option value="MAR">Morocco</option>
<option value="MOZ">Mozambique</option>
<option value="MMR">Myanmar</option>
<option value="NAM">Namibia</option>
<option value="NRU">Nauru</option>
<option value="NPL">Nepal</option>
<option value="NLD">Netherlands</option>
<option value="ANT">Netherlands Antilles</option>
<option value="NCL">New Caledonia</option>
<option value="NZL">New Zealand</option>
<option value="NIC">Nicaragua</option>
<option value="NER">Niger</option>
<option value="NGA">Nigeria</option>
<option value="NIU">Niue</option>
<option value="NFK">Norfolk Island</option>
<option value="MNP">Northern Mariana Islands</option>
<option value="NOR">Norway</option>
<option value="OMN">Oman</option>
<option value="PAK">Pakistan</option>
<option value="PLW">Palau</option>
<option value="PSE">Palestinian Territory, Occupied</option>
<option value="PAN">Panama</option>
<option value="PNG">Papua New Guinea</option>
<option value="PRY">Paraguay</option>
<option value="PER">Peru</option>
<option value="PHL">Philippines</option>
<option value="PCN">Pitcairn</option>
<option value="POL">Poland</option>
<option value="PRT">Portugal</option>
<option value="PRI">Puerto Rico</option>
<option value="QAT">Qatar</option>
<option value="REU">Reunion</option>
<option value="ROU">Romania</option>
<option value="RUS">Russian Federation</option>
<option value="RWA">Rwanda</option>
<option value="SHN">Saint Helena</option>
<option value="KNA">Saint Kitts and Nevis</option>
<option value="LCA">Saint Lucia</option>
<option value="SPM">Saint Pierre and Miquelon</option>
<option value="VCT">Saint Vincent and the Grenadines</option>
<option value="WSM">Samoa</option>
<option value="SMR">San Marino</option>
<option value="STP">Sao Tome and Principe</option>
<option value="SAU">Saudi Arabia</option>
<option value="SEN">Senegal</option>
<option value="SRB">Serbia</option>
<option value="SCG">Serbia and Montenegro</option>
<option value="SYC">Seychelles</option>
<option value="SLE">Sierra Leone</option>
<option value="SGP">Singapore</option>
<option value="SVK">Slovakia</option>
<option value="SVN">Slovenia</option>
<option value="SLB">Solomon Islands</option>
<option value="SOM">Somalia</option>
<option value="ZAF">South Africa</option>
<option value="SGS">South Georgia and the South Sandwich Islands</option>
<option value="ESP">Spain</option>
<option value="LKA">Sri Lanka</option>
<option value="SUR">Suriname</option>
<option value="SJM">Svalbard and Jan Mayen Islands</option>
<option value="SWZ">Swaziland</option>
<option value="SWE">Sweden</option>
<option value="CHE">Switzerland</option>
<option value="TWN">Taiwan</option>
<option value="TJK">Tajikistan</option>
<option value="TZA">Tanzania, United Republic of</option>
<option value="THA">Thailand</option>
<option value="TLS">Timor-Leste</option>
<option value="TGO">Togo</option>
<option value="TKL">Tokelau</option>
<option value="TON">Tonga</option>
<option value="TTO">Trinidad and Tobago</option>
<option value="TUN">Tunisia</option>
<option value="TUR">Turkey</option>
<option value="TKM">Turkmenistan</option>
<option value="TCA">Turks and Caicos Islands</option>
<option value="TUV">Tuvalu</option>
<option value="UGA">Uganda</option>
<option value="UKR">Ukraine</option>
<option value="ARE">United Arab Emirates</option>
<option value="GBR">United Kingdom</option>
<option value="USA">United States</option>
<option value="UMI">United States Minor Outlying Islands</option>
<option value="URY">Uruguay</option>
<option value="UZB">Uzbekistan</option>
<option value="VUT">Vanuatu</option>
<option value="VAT">Vatican City State (Holy See)</option>
<option value="VEN">Venezuela</option>
<option value="VNM">Viet Nam</option>
<option value="VGB">Virgin Islands, British</option>
<option value="VIR">Virgin Islands, U.S.</option>
<option value="WLF">Wallis and Futuna Islands</option>
<option value="ESH">Western Sahara</option>
<option value="YEM">Yemen</option>
<option value="YUG">Yugoslavia</option>
<option value="ZAR">Zaire</option>
<option value="ZMB">Zambia</option>
<option value="ZWE">Zimbabwe</option>
</select>
</div>
</div>
<div class="form-group required">
<label class="col-md-2">Full Name</label>
<div class="col-md-10">
<input class="form-control" id="card_holder_name" name="card_holder_name" type="text" placeholder="Full Name" required />
</div>
</div>
<div class="form-group required">
<label class="col-md-2">Address 1</label>
<div class="col-md-10">
<input class="form-control" id="street_address" name="street_address" type="text" placeholder="Address 1" required />
</div>
</div>
<div class="form-group">
<label class="col-md-2">Address 2</label>
<div class="col-md-10">
<input class="form-control" id="street_address2" name="street_address2" type="text" placeholder="Address 2"/>
</div>
</div>
<div class="form-group required">
<label class="col-md-2">City</label>
<div class="col-md-10">
<input class="form-control" id="city" name="city" type="text" placeholder="City" required />
</div>
</div>
<div class="form-group required">
<label class="col-md-2">State / Province</label>
<div class="col-md-10">
<input class="form-control" id="state" name="state" type="text" placeholder="State/Province" required />
</div>
</div>
<div class="form-group required">
<label class="col-md-2">Postal Code</label>
<div class="col-md-10">
<input class="form-control" id="zip" name="zip" type="text" placeholder="Postal Code" required />
</div>
</div>
<div class="form-group">
<label class="col-md-2">Phone</label>
<div class="col-md-10">
<input class="form-control" id="phone" name="phone" type="text" placeholder="Phone" required />
</div>
</div><!--form group-->
<div class="form-group required">
<label class="col-md-2">Email</label>
<div class="col-md-10">
<input class="form-control" id="email" name="email" type="text" placeholder="Email" required />
</div>
</div>
<input type='hidden' name='sid' value='<?php echo TWOCHECKOUT_SELLER_ID;?>' />
<input type='hidden' name='mode' value='2CO' />
<input type='hidden' name='li_0_type' value='product' />
<input type='hidden' name='li_0_name' value='<?php echo $product_name;?>' />
<input type='hidden' name='li_0_product_id' value='<?php echo $order_id;?>' />
<input type='hidden' name='li_0_price' value='<?php echo $total;?>' />
</div>
</div>
<div class="col-md-12 text-center">
<input type="submit" class="btn btn-success btn-sm" value="Complete Checkout">
</div>
</form>
Consider using standard checkout instead. It lets the customer add the coupon code in the review cart step
I'm using Materialize css framework to develop a custom web app for my company.
So at one point I have to display a select containing a few tasks, grouped by project, using optgroups. Every project is different from one another, and so are the related tasks BUT some tasks may have the same name (even if they are stored with different Ids in the database).
To be as precise as possible, let's say my project "Project One" has a task 'R&D' (id=1) and a task 'Developpement' (id=2). My project "Project Two" has a task "Meeting with customer" (id=3) and a task 'R&D' (id=4).
So the original html select has the right option selected (id=4) but the material select rendered has the first option with the name "R&d" selected...
<select id="selectId" name="SelectName">
<option value="">Select Main task</option>
<optgroup label="Project 1">
<option value="420">Task Name 1</option>
<option value="421">Task Name 2</option>
</optgroup>
<optgroup label="Project 3">
<option value="2168">Task Name 7</option>
<option value="2169" selected="selected">Task Name 2</option>
</optgroup>
</select>
renders
<div class="select-wrapper">
<span class="caret">▼</span>
<input type="text" class="select-dropdown" readonly="true" data-activates="select-options-75d04c8c-c252-a1ab-a84a-b5e81f275405" value="Task Name 2">
<ul id="select-options-75d04c8c-c252-a1ab-a84a-b5e81f275405" class="dropdown-content select-dropdown"
style="width: 250px; position: absolute; top: 0px; left: 0px; opacity: 1; display: none;">
<li class=""><span>Select Main task</span></li>
<li class="optgroup"><span>Project 1</span></li>
<li class="optgroup-option "><span>Task Name 1</span></li>
<li class="optgroup-option"><span>Task Name 2</span></li>
<li class="optgroup"><span>Project 3</span></li>
<li class="optgroup-option "><span>Task Name 7</span></li>
<li class="optgroup-option "><span>Task Name 2</span></li>
</ul>
<select id="task_mainTaskQuote" name="task[mainTaskQuote]" required="required" class="initialized">
<option value="">Select Main task</option>
<optgroup label="Project 1">
<option value="420">Task Name 1</option>
<option value="421">Task Name 2</option>
</optgroup>
<optgroup label="Project 2">
<option value="465">Task Name 3</option>
<option value="466">Task Name 4</option>
<option value="467">Task Name 5</option>
<option value="2739">Task Name 6</option>
</optgroup>
<optgroup label="Project 3">
<option value="2168">Task Name 7</option>
<option value="2169" selected="selected">Task Name 2</option>
<option value="2170">Task Name 8</option>
<option value="2180">Task Name 9</option>
<option value="2181">Task Name 10</option>
</optgroup>
</select>
</div>
Here is a jsFiddle about it : https://jsfiddle.net/h7vu2nb1/
Any hints on what I do wrong in this case or on how I can prevent this behaviour?
Thx
This might not be a proper solution but, going through materialize forms.js file on their Github, it appears that the javascript code initializing their select uses the name of the option, not its value. So you are not doing anything wrong, it's just that the way the plugin works doesn't fit your needs.
However regarding your issue I can't provid you more help.
I am creating a form using the Drupal 7 form API. One of my fields is a select box of countries and states. I am only using 5 countries. The goal is to have the select box have optgroups for the countries and under that each state/province for that country. In HTML it would be like this:
<select>
<optgroup label="United States">
<option value="AK">Arkansas</option>
<option value="AL">Alabama</option>
...
<optgroup label="Canada">
<option value="AB">Alberta</option>
<option value="ON">Ontario</option>
...
</select>
I have a hardcoded array of countries and I am getting the states including country name from the dB. I am trying to contruct my options array for the select box, but for some reason, it is only working for the first country in the list, in this case, the United States. Here is my code:
// get list of states from dB
$states = db_query('SELECT state_code, state_name, country_name FROM {states}');
$countries = array(
'US' => 'United States',
'CAN' => 'Canada',
'AU' => 'Australia',
'NZ' => 'New Zealand',
'BM' => 'Bermuda'
);
foreach($countries as $country_code => $country_name) {
$states_options[$country_name] = array();
foreach($states as $state) {
if($country_name == $state->country_name) {
$states_options[$country_name][$state->state_code] = $state->state_name;
}
}
}
$form['location'] = array(
'#type' => 'select',
'#options' => $states_options,
'#required' => FALSE,
);
which ends up yielding:
<select style="width:80%;" id="edit-location" name="location" class="form-select">
<optgroup label="United States">
<option value="AK">Alaska</option>
<option value="AL">Alabama</option>
<option value="AR">Arkansas</option>
<option value="AZ">Arizona</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DC">District Of Columbia</option>
<option value="DE">Delaware</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="IA">Iowa</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="MA">Massachusetts</option>
<option value="MD">Maryland</option>
<option value="ME">Maine</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MO">Missouri</option>
<option value="MS">Mississippi</option>
<option value="MT">Montana</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="NE">Nebraska</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NV">Nevada</option>
<option value="NY">New York</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="PR">Puerto Rico</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VA">Virginia</option>
<option value="VT">Vermont</option>
<option value="WA">Washington</option>
<option value="WI">Wisconsin</option>
<option value="WV">West Virginia</option>
<option value="WY">Wyoming</option>
<option value="VI">U.S. Virgin Islands</option>
<option value="GU">Guam</option>
</optgroup>
<optgroup label="Canada">
</optgroup>
<optgroup label="Australia">
</optgroup>
<optgroup label="New Zealand">
</optgroup>
<optgroup label="Bermuda">
</optgroup>
</select>
UPDATE:
Ok so I figured out that it was because of the way I was constructing the query. I was originally using this:
$states= db_query('SELECT state_code, state_name, country_name FROM {states}');
Which gave me what I needed and I could do a foreach and loop over $states and echo out the values just fine, but if I did a var_dump on $states, I wouldn't get the actual records, I would get a bunch of information about the query and the actual query that was executed etc. Maybe I needed to use a specific type of fetch method. Anyway I ended up switching it to:
$states = db_select('states', 's')
->fields('s')
->execute()
->fetchAll();
and it worked without me changing any of my looping code.
I'm doing a redesign for my class, and I can't get the button even with the drop down menu. I've been trying different ways but cant get them to line up.
http://jgoldd.github.io/wsp/Project/index.html
try this css:
button, input, select, textarea {
font-size: 100%;
margin: 0 0 0 10px;
vertical-align: baseline;
float: left;
}
and experiment it out! Good luck! :)
Have you tried using tables? Usually that solves everything.
Here's the working JSFIDDLE > http://jsfiddle.net/PV3p5/
And here's the HTML. Try it!
<table style="border:none;">
<tr>
<td>State:
<select name="state_list" id="state_list">
<option value="" selected="selected">Select a State</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District Of Columbia</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select>
</td>
<td style="padding-left:50px;"> City:
<select name="main_city_list" id="city_list">
<option>albuquerque</option>
<option>amarillo</option>
<option>boulder</option>
<option>central sd</option>
<option>clovis-portales</option>
<option>colorado springs</option>
<option>denver</option>
<option>eastern colorado</option>
<option>farmington</option>
<option>fort collins</option>
<option>grand island</option>
<option>high rockies</option>
<option>lincoln</option>
<option>logan</option>
</select>
</td>
</tr>
</table>
I'm doing a project for a class, basically trying to do a survey to match people with a dorm based on their desired lifestyle. I copied the syntax for the form and some of them pop up correctly-the question appears with a drop down menu, but then the questions "how often do you plan on going to red lion" and "how do you plan on eating most of your meals" dont show up, and the options that should be in the drop down menu appear as text on the page, not as a drop down menu. any ideas? Heres the code:
<!DOCTYPE html>
<html>
<head>
<title> Find the right dorm for you </title>
<h1>Find out what dorm fits your lifestyle!</h1>
</head>
<body>
<p> Please fill out a few quesitons so we can help you figure out which dorm is best for you. </p>
<form method="get" action="slutsky1-results.php">
I enjoy (check all that apply):<br>
<input type="checkbox" name="act1" value="8">Working Out<br>
<input type="checkbox" name="act2" value="3">Bowling<br>
<input type="checkbox" name="act3" value="3">Live Music<br>
<input type="checkbox" name="act4" value="5">Shopping<br>
<input type="checkbox" name="act5" value="7">Food<br>
<input type="checkbox" name="act6" value="9">Bars <br>
<input type="checkbox" name="act7" value="9">Frat Parties <br>
<input type="checkbox" name="act8" value="8">Sports <br>
<input type="checkbox" name="act9" value="3">Library <br>
Is being close to the quad important to you?:
<select name= "Quad">
<option value="1">Not important</option>
<option value="3">Kind of important</option>
<option value="6">Very Important</option>
<option value="3">Only thing that matters</option> <br>
How often do you plan on going to Red Lion?:
<select name= "Lion">
<option value="1">Never</option>
<option value="5">Sometimes</option>
<option value="10">Over 3 times a week</option> <br>
Would you rather go to the ARC or CRCE?:
<select name= "Gym">
<option value="10">Arc</option>
<option value="1">CRCE</option>
<br>
How do you plan on eating most of your meals?:
<select name= "Gym">
<option value="5">Ordering delivery</option>
<option value="8">Walking To Green St.</option>
<option value="5">Making my own food</option>
<br>
Private or Public dorm?:
<select name= "Gym">
<option value="10">Private</option>
<option value="5">Public</option>
<br>
<input type="submit" value="get my results!">
</form>
</body>
</html>
You need to close your select tags (using </select>) after the option lists:
<select name= "Gym">
<option value="10">Arc</option>
<option value="1">CRCE</option>
</select>
Do that to every list.
You aren't closing your select tags. So the browser is trying to guess what you are trying to accomplish. Remember that all tags should be closed.
<select name= "Quad">
<option value="1">Not important</option>
<option value="3">Kind of important</option>
<option value="6">Very Important</option>
<option value="3">Only thing that matters</option>
</select>
For help finding these sorts of issues, run your page against an html validator.