Would it be possible to link different form fields to each other, e.g.: when someone enters a phone#, it will fetch the corresponding Name, Address, etc. and populate the other fields in the form.
I have a huge database that I will import and this feature will help a lot.

Comments

Vako created an issue. See original summary.

vako’s picture

Title: Fetching data from a field and populate form components » Fetch data and populate form components
vako’s picture

I did a search and found this similar 8-year-old topic that is still pending, hopefully it will be integrated in the main Webform module.

vako’s picture

Actually this feature exist in the Commerce module. Webform needs this feature, hopefully it will be implemented or the code borrowed from the Commerce module.

liam morland’s picture

Status: Active » Fixed

A big feature like this is unlikely to be implemented in Drupal 7. It would probably be best to implement it in an add-on module. This is unlikely to be done in Webform core in Drupal 7; it could potentially happen in Drupal 8. Either way, a developer would need to pick-up this idea and run with it.

The issue you mention is closed; #228622: populate a field with another one.

vako’s picture

Status: Fixed » Closed (won't fix)

OK, thanks. If anyone will find an add-on module that can do something like this, please post it here.

liam morland’s picture

Status: Closed (won't fix) » Fixed

Why do you want to do this? A form is for collecting information. If you already know the name, etc. based on phone number, why include those fields in the form? If you need to add additional fields to the data download, there are hooks you can use to do that.

vako’s picture

Maybe I didn't explain it properly in my initial post. The request I have is linked to collecting information and displaying it, just what Webform is for and hoping that it maybe considered as a new feature for the next release.
My request is a simple search feature that will fetch a row depending on the search entered. e.g.: if you are searching for a phone#, it will display the name and address as well, just like the contacts list on your mobile phone.
Probably it can be done by Views or other modules, but would be nicer if we can have that feature incorporated in Webform since it deals with data and search is an important feature for data manipultation.

liam morland’s picture

I don't understand. Are you trying to use Webform as a search form to search an existing database?

vako’s picture

Not exactly a search feature but you can say a search and retrieve option. i.e.: search for a name and display the address and phone#
Is this functionality already in the module?

liam morland’s picture

No, that is not what Webform is for. You could make something like that using a content type and a filterable View.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.