aboutsummaryrefslogtreecommitdiffstats
path: root/Lessons/Lesson_73/UefiLessonsPkg/HIIFormDataElements/Form.vfr
diff options
context:
space:
mode:
Diffstat (limited to 'Lessons/Lesson_73/UefiLessonsPkg/HIIFormDataElements/Form.vfr')
-rw-r--r--Lessons/Lesson_73/UefiLessonsPkg/HIIFormDataElements/Form.vfr105
1 files changed, 105 insertions, 0 deletions
diff --git a/Lessons/Lesson_73/UefiLessonsPkg/HIIFormDataElements/Form.vfr b/Lessons/Lesson_73/UefiLessonsPkg/HIIFormDataElements/Form.vfr
new file mode 100644
index 0000000..f01391a
--- /dev/null
+++ b/Lessons/Lesson_73/UefiLessonsPkg/HIIFormDataElements/Form.vfr
@@ -0,0 +1,105 @@
+#include <Uefi/UefiMultiPhase.h>
+#include "Data.h"
+
+formset
+ guid = FORMSET_GUID,
+ title = STRING_TOKEN(FORMSET_TITLE),
+ help = STRING_TOKEN(FORMSET_HELP),
+
+ efivarstore UEFI_VARIABLE_STRUCTURE,
+ attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
+ name = FormData,
+ guid = FORMSET_GUID;
+
+ defaultstore StandardDefault,
+ prompt = STRING_TOKEN(STANDARD_DEFAULT_PROMPT),
+ attribute = 0x0000;
+
+ defaultstore ManufactureDefault,
+ prompt = STRING_TOKEN(MFG_DEFAULT_PROMPT),
+ attribute = 0x0001;
+
+ form
+ formid = 1,
+ title = STRING_TOKEN(FORMID1_TITLE);
+
+ checkbox
+ varid = FormData.CheckboxValue,
+ prompt = STRING_TOKEN(CHECKBOX_PROMPT),
+ help = STRING_TOKEN(CHECKBOX_HELP),
+ default = TRUE,
+ endcheckbox;
+
+ numeric
+ name = NumericQuestion,
+ varid = FormData.NumericValue,
+ prompt = STRING_TOKEN(NUMERIC_PROMPT),
+ help = STRING_TOKEN(NUMERIC_HELP),
+ flags = NUMERIC_SIZE_2 | DISPLAY_UINT_HEX,
+ //minimum = 0x1234,
+ //maximum = 0xaa55,
+ minimum = 0,
+ maximum = 10,
+ step = 1,
+ // default value = questionref(OneOfQuestion), // move `oneof` element before `numeric` for this case and change `max`
+ default = 7, defaultstore = StandardDefault,
+ default = 8, defaultstore = ManufactureDefault,
+ endnumeric;
+
+ string
+ name = StringQuestion,
+ varid = FormData.StringValue,
+ prompt = STRING_TOKEN(STRING_PROMPT),
+ help = STRING_TOKEN(STRING_HELP),
+ minsize = 5,
+ maxsize = 10,
+ default = STRING_TOKEN(STRING_DEFAULT),
+ endstring;
+
+ date
+ varid = FormData.DateValue,
+ prompt = STRING_TOKEN(DATE_PROMPT),
+ help = STRING_TOKEN(DATE_HELP),
+ default = 2021/05/22,
+ enddate;
+
+ time
+ varid = FormData.TimeValue,
+ prompt = STRING_TOKEN(TIME_PROMPT),
+ help = STRING_TOKEN(TIME_HELP),
+ default = 23:55:33,
+ endtime;
+
+ oneof
+ name = OneOfQuestion,
+ varid = FormData.OneOfValue,
+ prompt = STRING_TOKEN(ONEOF_PROMPT),
+ help = STRING_TOKEN(ONEOF_HELP),
+ option text = STRING_TOKEN(ONEOF_OPTION1), value = 0x00, flags = 0;
+ option text = STRING_TOKEN(ONEOF_OPTION2), value = 0x33, flags = MANUFACTURING;
+ option text = STRING_TOKEN(ONEOF_OPTION3), value = 0x55, flags = DEFAULT;
+ endoneof;
+
+ orderedlist
+ varid = FormData.OrderedListValue,
+ prompt = STRING_TOKEN(ORDERED_LIST_PROMPT),
+ help = STRING_TOKEN(ORDERED_LIST_HELP),
+ option text = STRING_TOKEN(ORDERED_LIST_OPTION1), value = 0x0A, flags = 0;
+ option text = STRING_TOKEN(ORDERED_LIST_OPTION2), value = 0x0B, flags = 0;
+ option text = STRING_TOKEN(ORDERED_LIST_OPTION3), value = 0x0C, flags = 0;
+ default = {0x0c, 0x0b, 0x0a},
+ endlist;
+
+ resetbutton
+ defaultstore = StandardDefault,
+ prompt = STRING_TOKEN(BTN_STANDARD_DEFAULT_PROMPT),
+ help = STRING_TOKEN(BTN_STANDARD_DEFAULT_HELP),
+ endresetbutton;
+
+ resetbutton
+ defaultstore = ManufactureDefault,
+ prompt = STRING_TOKEN(BTN_MFG_DEFAULT_PROMPT),
+ help = STRING_TOKEN(BTN_MFG_DEFAULT_HELP),
+ endresetbutton;
+ endform;
+endformset;