Hi Partha,

VfrCompile not support condition op-code for flags filed. Base on your request, 
maybe below code can meet?

grayoutif  NOT ideqval hf_form.var == 1;
string
varid = hf_form.Name,
questionid = x,
prompt = STRING_TOKEN(y),
help = STRING_TOKEN(z),
flags =  INTERACTIVE ,
minsize = 0,
maxsize = xx,
endstring;
endif;

Thanks,
Eric
From: partha sarathi swain [mailto:[email protected]]
Sent: Monday, August 11, 2014 7:47 PM
To: [email protected]
Subject: [edk2] How to change the flag depending upon a form variable in VFR.

Hi All,
My requirement is to change the flag of a string question in VFR depending upon 
 a form variable.

for example
string
varid = hf_form.Name,
questionid = x,
prompt = STRING_TOKEN(y),
help = STRING_TOKEN(z),
flags =  INTERACTIVE ,
minsize = 0,
maxsize = xx,
endstring;

I want to change the flag value from INTERACTIVE to READ_ONLY depending upon a 
form varable supose hf_form.var.

I tried the following code but it does not work stating cond is an undefined 
keyword

string
varid = hf_form.Name,
questionid = x,
prompt = STRING_TOKEN(y),
help = STRING_TOKEN(z),
flags =  cond((hf_form.var == 1) ?  INTERACTIVE : READ_ONLY) ,
minsize = 0,
maxsize = xx,
endstring;

please revert back to me if you have any alternative solution.

Thanks & Regards

Partha Sarathi Swain
ASD Dept.
LSI India Research and Development Center,
Bangalore-560103.


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to