Custom Form template fails with GoogleMaps element

How can I make GoogleMaps element work in custom Form Template?

  • Maybe the content of GoogleMaps is in <fieldset class ....

    Votes: 0 0.0%
  • Maybe the order of elements mathers

    Votes: 0 0.0%
  • Maybe I don't know how to get the right class

    Votes: 0 0.0%
  • Maybe googleapis doesn't work anymore

    Votes: 0 0.0%

  • Total voters
    0

marozen

Member
In the default bootstrap form template the GoogleMaps element is working (see attachment), but when I change it into a custom template and when I call the GoogleMaps element the GoogleMap shows a frame, but doesn't work (see attachmet). The 3 field elements of auto geo-complete also don't work anymore in the custom template.
 

Attachments

  • GPSnoproblem.png
    GPSnoproblem.png
    802.8 KB · Views: 86
  • GPSproblem.png
    GPSproblem.png
    516.3 KB · Views: 115
Your custom template must keep the Fabrik structure (HTML tags, classes, ids) so JS can work correctly.
If the default template is working it's surely not an issue with the Googlemaps API.
 
If you call a variable <?php $species = $elements['species']->element; ?> then all the fabrik classes are added. While with ....]->element_raw only the raw value.

I found something strange that solved the problem: See in attachment I deleted one of the variables and then all the other elements worked properly. Why is that?
 

Attachments

  • ThenItWorks.png
    ThenItWorks.png
    320.1 KB · Views: 99
  • OneElementWasProblem.png
    OneElementWasProblem.png
    47.8 KB · Views: 87
And now I found out that if I change this "species" databasejoin element from Auto-complete into Drop-down then all elements work properly again.

At bootstrap default however, the Auto-complete database join doesn't cause problems. So for now I will change it into a Drop-down, but not prefered because the Drop-down has 2000 records.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top