I am struggling to get something to work using out the box Easy Profile
I have a field user_vat where the user enters their company VAT number (with regex checking the format)
This is a required field
Every hour I have a script that looks for accounts with user_vat filled out (NOT NULL) and checks it against VIES (vat database)
If that check is good, there is a hidden field vat_ok that changes to a 1. At this point I want the user to be unable to change VAT number
So the theory is there
HOWEVER, once vat_ok is set to 1, the user_vat field should disappear or go read only BUT NOT LOSE IT VALUE
I have tried to use the condition statements (if vat_ok = 1 HIDE user_vat) but that blanks the value of user_vat field and still shows it as it is actually required.. though it will not store any value one vat_ok = 1 as it tries to hide it, blanks it, then keep reshowing it
How can I fulfil the above using Easy Profile or is it not possible with the current build
Quick Summary of requirement
user_vat = required field of format ABxxxxxxxxx (up to 11 digits) - working fine
if vat_ok = 1 user_vat goes read only or disappears but does NOT lose the value (this is not set by user, but by a CRON job running checks)
I suppose I could script this to use jQuery to hide the field, but that could be blocked.. or I could use a hidden value of confirmed_vat and propagate it and keep that hidden BUT due to the fact that user_vat is required, its always visible to the user and I cant hide it
Thanks in advance for any ideas that will help me fulfil the above