I have a custom pods page called addstory.php which uses a public form to display some input fields. For one of the fields, i have a input helper that displays a google map location which I can use to pick out a location which is stored in comma separated variable.
Here is the input helper code...
<div class="form pick <?php echo $location; ?>">
<div id="map" style="width:500; height:500">
</div>
<script type="text/javascript">
$(function() {
map=new GMap(document.getElementById("map"));
map.centerAndZoom(new GPoint(77.595062,13.043359),6);
map.setUIToDefault();
GEvent.addListener(map,"click",function(overlay,latlng) {
map.clearOverlays();
var marker = new GMarker(latlng);
map.addOverlay(marker);
//Extra stuff here..
}
);
});
</script>
</div>
And this is the code inside my addstory.php
<?php
get_header();
$rw = new Pod('rainwater');
$fields=array(
'name',
'email',
'location'=>array('input_helper'=>'gmap_location'),
);
echo $rw->publicForm($fields);
?>
I get the following error...and the google map doesn't load.
a is null
error source line: [Break on this error] function Qd(a){for(var b;b=a.firstChild;){Rg(b);a.removeChild(b)}}