how to Disable "Next" button in nsDialogs if text field has no value
Hi,
I am using nsDialogs for making custom pages and i am stuck with one issue. I want to disable the next button if there is no value in the text. I have tried the solution suggested in other forum post but no success. below is my code.
Page Custom ServerChangesCreate ServerChangesLeave ""
Function ServerChangesCreate
nsDialogs::Create 1018
Pop $dialog
;Create a list box
${NSD_CreateLabel} 75 240 80 20 "Password"
${NSD_CreateText} 165 240 210 20 $R6
Pop $MPwd
${NSD_CreateLabel} 75 270 80 20 "MPort"
${NSD_CreateNumber} 165 270 210 20 $R7
Pop $MPort
${NSD_SetText} $MySQLPort 33307
${NSD_CreateLabel} 75 130 80 20 "Email"
${NSD_CreateText} 165 130 195 20 $R1
Pop $EmailField
nsDialogs::Show
FunctionEnd
Function ServerChangesLeave
${NSD_GetText} $MPort $R7
${Unless} ${TCPPortOpen} $R7
;MessageBox MB_OK "$R7 port is free"
${Else}
MessageBox MB_OK " Port $R7 is occupied by some other process, please specify a different port "
Abort
${EndIf}
${NSD_GetText} $MPwd $R6
${NSD_GetText} $EmailField $R1
FunctionEnd
So you can see i am using three different text field, in password field i want normal validation of the text.
In email field it should have a proper email, we can check with the help of @.
Please help me out as i am stuck with this.