You are viewing limited content. For full access, please sign in.

Question

Question

Variables for Address Collection fields?

asked on May 11, 2015

What are the variables I need to use to get to the specific fields in an Address Collection on a form?

When I insert the Address collection, the only variable I see is simply called "Address". I need to assign the specific fields (city, state, zip etc) to individual template fields.

 

Thanks in advance.

Eric

0 0

Answer

APPROVED ANSWER
replied on December 14, 2016

Starting in Forms 10.0, you can set the individual values of an Address field into repository metadata fields.

0 0

Replies

replied on May 11, 2015

Thanks Alexander. However, that sort of defeats the purpose to use a pre-made collection if I have to go back and add all the javascript and extra fields.

I'll just create independent fields for the address and discard the Address collection altogether.

1 0
replied on May 11, 2015 Show version history

Sure. The built-in Address field in Forms can be more aesthetically pleasing to some, but if that isn't a concern, then using your own individual fields can be the way to go.

Another option is to use Workflow. You can retrieve the form content and there the address components are handled as individual elements which you can then assign to fields. The previous options mentioned above wouldn't require Workflow, but if you are going to be doing any other type of processing in Workflow anyways with that form, then you can just include this as well.

0 0
replied on December 14, 2016

So I'm dealing with the same issue, to my knowledge it still isn't possible to do this the way Eric stated.  Do you have/know the coding that would get us the same aesthetically pleasing look the address collection gives by using independent fields?

0 0
APPROVED ANSWER
replied on December 14, 2016

Starting in Forms 10.0, you can set the individual values of an Address field into repository metadata fields.

0 0
replied on December 14, 2016

That's not what I'm looking to do.  I'd like to fill out the address collection via look up rules using an outside data source.

0 0
replied on December 14, 2016

My response was to the OP. It sounds like your issue is actually different. I would recommend starting a new thread about the issue you're facing.

0 0
replied on May 11, 2015

Currently there isn't an out of the box way to do that, but you can use Javascript for this.

In your form, add additional individual single line fields for address1, address2, city, etc.

The idea is that whatever the user fills into the standard Address field will get transferred into those corresponding single line fields. We'll also use Javascript to hide these fields so they won't show up on the form.

$(document).ready (function () {
  
  $('.address1hf').hide();
  $('.address2hf').hide();
  $('.cityhf').hide();
  $('.statehf').hide();
  $('.ziphf').hide();
  $('.countryhf').hide();
  
  $('.Address1').on('change', function() {
    $('.address1hf input').val($(this).val());
  });
  
  $('.Address2').on('change', function() {
    $('.address2hf input').val($(this).val());
  });
  
  $('.City').on('change', function() {
    $('.cityhf input').val($(this).val());
  });
  
  $('.State').on('change', function() {
    $('.statehf input').val($(this).val());
  });
  
  $('.Postal').on('change', function() {
    $('.ziphf input').val($(this).val());
  });
  
  $('.Country').on('change', function() {
    $('.countryhf input').val($(this).val());
  });
  
});

The individual fields have CSS classes associated with them like address1hf, address2hf, etc. Those fields are hidden as soon as the form loads. Then, the Javascript takes what the user inputs into the standard address field and copies the value into the corresponding hidden fields.

Lastly, in the business process modeler service task, you can just map the variables of those hidden fields to the individual Laserfiche fields.

And here's what the document looks like in the repository

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.