1. peacetree
  2. Support
  3. Friday, May 19 2017, 12:20 PM
I selected a few custom fields to retrieve the geo location of google maps. This works, however! I would like to hide the geo field at registration. When I disable the gmap field at registration the script doesnt pass on the values to the field. The user would need to change vield values in order to populate the gmap field.

Thank you
Accepted Answer
admin Accepted Answer
Admin
All field are into a wrapper with a class called "ALIAS_OF_FIELD-group", so for example if alias of your map field is "map" then you should add this CSS code to your template:
.map-group{display:none}
  1. more than a month ago
  2. Support
  3. # Permalink
admin Accepted Answer
Admin
Hi,
sorry but this is not possible, and we do not want to implement something like this because it change normal workflow: if a field is editable from the form then it need to be available on the form (we want to avoid unexpected behavior).

Possible solution for you:
1. You can try to hide gmap field via CSS

2. You can write a plugin that fill gmap field (not simple) :
- Download, Install and Enable Skeleton Plugin (you will find it at http://docs.easy-profile.com/index.php/article/triggers)
- Open file /plugins/jsn/skeleton/skeleton.php
- Remove samples functions: triggerFieldAvatarUpdate, triggerProfileUpdate
- add function like this:

public function triggerProfileUpdate($user, &$data, $changed, $isNew)
{
/* HERE THE CODE TO GET LOCATION INFO FROM SOME SERVICE LIKE GOOGLEMAP APIs FROM SENT INFORMATIONS $data['cap'],$data['city'],$data['address'],......
$address = ADDRESS
$lat = LATITUDE
$lng = LONGITUDE
*/

$alias = 'ALIAS_OF_GMAP_FIELD';
$data[$alias] = $address;
$data[$alias.'_lat'] = $lat;
$data[$alias.'_lng'] = $ng;

}
  1. more than a month ago
  2. Support
  3. # 1
peacetree Accepted Answer
Hey, thank you for the detailed answer!

I underdtand the workflow logic that you want to keep, however considder that the regional search and the gmap field may well be a frequent use-case.

I looked at the CSS to hide the tab but didnt succeed. Could you be so kind to outline how to hide the tab the best way.

Thank you
  1. more than a month ago
  2. Support
  3. # 2
peacetree Accepted Answer
Does the trick with a ; at the end, thanks for that.
  1. more than a month ago
  2. Support
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.