If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Force a field refresh on data returned from a capture link?

06-19-2014, 10:51 AM

I am using a phone # field as a look up for contact information. The data is saved without the template. So I would save 8005551212 instead of 800-555-1212. I use the onblur ajax event to look for a match based on phone # and if I find it I populate the other contact fields on the form. That all works great. I also added a capture link that returns the phone #. My problem is that it returns 8005551212 but it doesn't insert the template when it returns. So when I tab off the field I get an error that the data is not in the correct format because it doesn't have the -'s. I tried putting code in the onchange event that said if there are no -'s in the field insert them but when I do that I get the dashes I inserted and the template dashes. What's strange is that if I were to cut and paste into that field it would insert the dashes automatically but when populated with ajax it doesn't do that.

So I need to know the best way to get the dashes in the field. Is there a refresh option?

When the capture link returns the # string 8005551212 if I select the field and then press CTRL A it forces the template to show up, which is my ultimate goal.
It's just a display issue but the client won't accept the solution without it working.