• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1153
  • Last Modified:

Auto populate fields based on another field in registration form of jomsocial

Hi,

We are using jomsocial. we need ajax kind of fields for load dynamically when registering the user  

example : take two fields state and city ..suppose is i selected particular state i am able to view the cities of the state in city field .how it can be done

Thanks & Regards
Byteridge
0
Byteridge
Asked:
Byteridge
  • 3
  • 2
1 Solution
 
ByteridgeAuthor Commented:
Briefly : update field based on another field
0
 
leakim971PluritechnicianCommented:
0
 
ByteridgeAuthor Commented:
first i need how to achieve this
0
 
leakim971PluritechnicianCommented:
1 - create a new table for cities with a "state" field, good to have a primary key
2 - insert all cities (with their state) in the table
3 - when the user achieve to enter the state (you use the onblur event) you do an ajax call to try to get a list of citie for the state, you can use a dropdown or with jquery an autocomplete object (http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/)

So you need :
- ajax page to return an array of cities from a given state
- a javascript to do the ajax call that handle and create options from an array of cities
0
 
ByteridgeAuthor Commented:
Jomsocial guys are going to add this functionality in future
..plz refer this url :
 http://uservoice.jomsocial.com/forums/4333-general/suggestions/74155-hide-empty-fields-more-field-types-and-dependabl
 
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now