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

Question

Question

Masked field with hidden field not working.

asked on June 25, 2014

I have a form with two fields that are required before a user can complete the form.  When you open the form you see one field (refer to the attached- more detail) and when you enter a specific string it is supposed to reveal the second field.  In the attached document I have screen shots of the field rules and the masking script.  The crazy thing is I have this set up on my demo form - it works perfectly but when I did it at the customer site I had the problem.  I have looked and can't find any differences but I'm sure there must be something.  Thanks for the second set of eyes smiley  Let me know if you need any more info.  How do I determine the version of Forms on each server?

 

0 0

Answer

APPROVED ANSWER
replied on July 7, 2014 Show version history

The reason the script may not be running when you are accessing the Forms site from a workstation is because it's referencing

 

https://localhost/Forms/js/jquery.mask.min.js

 

and that URL is only valid when accessed from the web server. Instead of using localhost, try the FQDN of the web server.

 

*Edit*

This was the solution offered in the support chat which has been confirmed to resolve the issue.

0 0

Replies

replied on June 26, 2014

In your JavaScript you are referencing the jquery.mask.min.js file on the local host using https. When you move it to the customers site, do they have that js file on their local machine? If so, is it setup to use https?

 

You can find out what verison of Forms is installed on the server by clicking the name of the logged in Forms user in the top right corner and then clicking on About.

0 0
replied on June 27, 2014 Show version history

If the machine isn't able to load the javascript file, none of the code will run. If values are being masked, it means the issue is with your field rules or JavaScript.

 

You are filling a field with the original value, so you could adjust your field rules to show/hide when the republican/democrat/filled fields contain what you want. That way, even if the original field value changes, the rule will still work because it's pointing to the filled field, too.

0 0
replied on June 30, 2014

I tried that but since the second set of fields is hidden it doesn't see that they have data.

0 0
replied on June 30, 2014

Are you hiding the second set with field rules or with CSS or JavaScript? If you're hiding them with field rules, they will not be filled with values because when they are hidden they're also disabled. If you hide those fields with CSS, it should work as you expect.

0 0
replied on June 26, 2014

Yes the server is using https - I am using localhost because when I put in the server name it didn't find the script.  But now it finds the script because it's putting in the ****.  

 

I think the issue has something to do with the data being replaced by the *****. The rule is that it must be a123 and when you type in a123 the second field is revealed but when you tab out of the field it replaces a123 with **** and the field rule is reading the change and is hiding the field again.  I put the data (a123) in another hidden field so I tried changing the rule that the a123 is in the Dem (hidden) field but because it is hidden it doesn't work - if I reveal that field (total defeat of the purpose) it does reveal the second field.

 

Thanks for your help - I'll try comparing versions between what's on my laptop and what's on the server.  Could it have anything to do with the https because that is definitely different?

 

it's reading the asktericks

0 0
replied on July 7, 2014

I was able to get a script working on the customer's server - see attached - but when I access from any other machine the script doesn't run.  I believe I have enabled java scripting etc. because I was able to get it working.  It's just since we added the ability to mask the password that it stopped.

 

Is there something I'm missing?

0 0
APPROVED ANSWER
replied on July 7, 2014 Show version history

The reason the script may not be running when you are accessing the Forms site from a workstation is because it's referencing

 

https://localhost/Forms/js/jquery.mask.min.js

 

and that URL is only valid when accessed from the web server. Instead of using localhost, try the FQDN of the web server.

 

*Edit*

This was the solution offered in the support chat which has been confirmed to resolve the issue.

0 0
replied on July 7, 2014

You are absolutely right.  I corrected this a while back so I didn't think to check it again.  Thanks for your help!

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

Sign in to reply to this post.