Here is my init:
This is where I am calling the page:
Function .onInit
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "assets\RegForm.ini" "RegForm"
FunctionEnd
The function calls:
!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
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