Hi Bob,
Thanks for the fast reply. Do I add the code from the example website I posted in the ChronoForm via the Form Code - HTML Code tab in ChronoForms? I built the form using the wizard and edited it in same.
Here is a link to the test form on our site that I am working on:
http://sangareecommunity.info/home/index.php?option=com_chronocontact&chronoformname=ReportAProblemTestThe problem that I am having is that the map overlaps the form boxes. Plus there is no data like Long or Lat included in the email I get back after submitting the test form. I get all form data ok but nothing from the map. Maybe something to do with the Email Template? I am very new and still learning :-)
I see on the Form Code - HTML Code tab in ChronoForms it says this:
"Hint: Don't use <html> - <body> - <head> - <form> - <script> -<style> tags in the 2 boxes below!
Form HTML:
(May contain PHP code with tags)
Form JavaScript:
(May contain PHP code with tags)"
The map I am trying to insert has <script> tags in it. Below is the Form Code - Form HTML code
without the map code inserted. Then below that code is the map code:
<div class="form_item">
<div class="form_element cf_heading">
<h4 class="cf_text">Please provide the following contact information. This information will be used only if there is a need to clarify the report. </h4>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">First Name:</label>
<input class="cf_inputbox required" maxlength="150" size="30" title="Required Information" id="text_1" name="text_1" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Last Name:</label>
<input class="cf_inputbox required" maxlength="150" size="30" title="Required Information" id="text_2" name="text_2" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 150px;">Address:</label>
<textarea class="cf_inputbox" rows="3" id="text_14" title="" cols="30" name="text_14"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Contact Phone:</label>
<input class="cf_inputbox required" maxlength="150" size="30" title="Required information" id="text_10" name="text_3" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Contact E-Mail:</label>
<input class="cf_inputbox required validate-email" maxlength="150" size="30" title="Required Information" id="text_6" name="text_6" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_heading">
<h4 class="cf_text">Report a Problem</h4>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_datetimepicker">
<label class="cf_label" style="width: 150px;">Date of Report:</label>
<input class="cf_datetime" title="Select todays date." size="20" id="date_17" name="date_17" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Type of Problem:</label>
<select class="cf_inputbox validate-selection" id="select_23" size="1" title="Required Information" name="select_23">
<option value="">Choose Option</option>
<option value="Abandoned Vehicle Complaint">Abandoned Vehicle Complaint</option>
<option value="Dead Animal Pickup">Dead Animal Pickup</option>
<option value="Debris Hanging From Wires or Poles">Debris Hanging From Wires or Poles</option>
<option value="Dirty Street Cleaning">Dirty Street Cleaning</option>
<option value="Sidewalk Repair">Sidewalk Repair</option>
<option value="Graffiti Removal">Graffiti Removal</option>
<option value="Grass Mowing-Public Property">Grass Mowing-Public Property</option>
<option value="Parking Problem-Public Property">Parking Problem-Public Property</option>
<option value="Sign Investigation-Public Property">Sign Investigation-Public Property</option>
<option value="Park Maintenance">Park Maintenance</option>
<option value="Playground Maintenance">Playground Maintenance</option>
<option value="Pothole Repair">Pothole Repair</option>
<option value="Storm Drainage Problem">Storm Drainage Problem</option>
<option value="Street Crosswalk/Lane Markings">Street Crosswalk/Lane Markings</option>
<option value="Street Light Out">Street Light Out</option>
<option value="Street Repair">Street Repair</option>
<option value="Traffic Sign-Missing">Traffic Sign-Missing</option>
<option value="Traffic/Parking Sign Damaged">Traffic/Parking Sign Damaged</option>
<option value="Trash/Garbage Public Property">Trash/Garbage Public Property</option>
<option value="Other">Other</option>
</select>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_heading">
<h5 class="cf_text">Please type in the EXACT location of the problem. The better you describe where the problem is; the faster we can act on the information! </h5>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 150px;">Location Details:</label>
<textarea class="cf_inputbox required" rows="3" id="text_18" title="Required Information" cols="30" name="text_18"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 150px;">Description of Problem: </label>
<textarea class="cf_inputbox required" rows="6" id="text_19" title="Required Information" cols="30" name="text_19"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_fileupload">
<label class="cf_label" style="width: 150px;">Photo of Problem (Optional):</label>
<input class="cf_fileinput cf_inputbox" title="" size="20" id="file_16" name="file_16" type="file" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_heading">
<h4 class="cf_text">Allowed extensions: jpg,gif,png,tiff</h4>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_radiobutton">
<label class="cf_label" style="width: 150px;">Have you reported this issue before?</label>
<div class="float_left">
<input value="Yes" title="Required Information" class="radio validate-one-required" id="radio00" name="radio0" type="radio" />
<label for="radio00" class="radio_label">Yes</label>
<br />
<input value="No" title="Required Information" class="radio validate-one-required" id="radio01" name="radio0" type="radio" />
<label for="radio01" class="radio_label">No</label>
<br />
</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_radiobutton">
<label class="cf_label" style="width: 150px;">Do you want us to contact you?</label>
<div class="float_left">
<input value="Yes" title="Required Information" class="radio validate-one-required" id="radio10" name="radio1" type="radio" />
<label for="radio10" class="radio_label">Yes</label>
<br />
<input value="No" title="Required Information" class="radio validate-one-required" id="radio11" name="radio1" type="radio" />
<label for="radio11" class="radio_label">No</label>
<br />
</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 150px;">Is there any additional information that you would like us to know.</label>
<textarea class="cf_inputbox" rows="5" id="text_12" title="" cols="30" name="text_12"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_button">
<input value="Submit" name="button_10" type="submit" /><input type="reset" name="reset" value="Reset"/>
</div>
<div class="cfclear"> </div>
</div>
Latitude: <input class="required" type="text" name="latitude" id="latitude" value="33.03536277133918" />
Longitude: <input class="required" type="text" name="longitude" id="longitude" value="-80.12981414794922"
/>
<br /><br />
<div id="map" style="width: 600px; height: 420px"></div>
<!-- add your map api key here -->
<script type="text/javascript" src="http://maps.google.com/maps?
file=api&v=2&key=xxxxxxxxxxxxxxxxx">
</script>
<script type="text/javascript">
<!--
if (GBrowserIsCompatible())
{
// create map and add controls
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
// set centre point of map
var centrePoint = new GLatLng('33.03536277133918', '-80.12981414794922');
map.setCenter(centrePoint, 14);
// add a draggable marker
var marker = new GMarker(centrePoint, {draggable: true});
map.addOverlay(marker);
// add a drag listener to the map
GEvent.addListener(marker, "dragend", function() {
var point = marker.getPoint();
map.panTo(point);
document.getElementById("latitude").value = point.lat();
document.getElementById("longitude").value = point.lng();
});
}
//-->
</script>