custom page and validate the input
I am working on developing a custom page that needs to validate the input before continuing. I have read the OptionInstall2 page a number of times now and simply do not understand how to get the validation function called. Here is what I have:
Here is my init:
Function .onInit
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "assets\RegForm.ini" "RegForm"
FunctionEnd
This is where I am calling the page:
!insertmacro MUI_PAGE_LICENSE "..\licence\Licence.txt"
LangString REGFORM_TITLE ${LANG_ENGLISH} "Registration."
LangString REGFORM_SUBTITLE ${LANG_ENGLISH} "Enter your Unlock Key."
Page custom RegPageShow
!insertmacro MUI_PAGE_DIRECTORY
The function calls:
Function RegPageShow
!insertmacro MUI_HEADER_TEXT "$(REGFORM_TITLE)" "$(REGFORM_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "RegForm"
FunctionEnd
Function RegPageValidate
ReadINIStr $R0 "RegistrationForm" "Field 4" "State"
StrCmp $R0 "" 0 +3
MessageBox MB_ICONEXCLAMATION|MB_OK "Please enter your name."
Abort
FunctionEnd