dfranklin72
26th May 2009 14:36 UTC
custom signup page MUI
I’m trying to create a custom signup page.in MUI It will include details like username, password, email which the ser will be asked to complete. From the output I need to save these to a local file and also modify a link which I call in the we plug-in. This will create the account on our backend database.
Does anyone have an example to look at as I’m a newbie to this and I’m fining NSdialogs more complicated than I was expecting.
mattm591
26th May 2009 15:12 UTC
To build the signup form you need to create a custom page.
Page custom myPage myProcess ""
myPage is the name of the function that will create the page and myProcess is the name of the function that will process the details. This is the function I used to create a login page (the variables need to be defined outside of the function and I made use of the LogicLib which you will need to include).
myPage
nsDialogs
::Create 1018
Pop $pgDialog
>${If} $pgDialog == error
Abort
>${EndIf}
!insertmacro MUI_HEADER_TEXT "Server login" "Please login to the server."
>${NSD_CreateLabel} 0 0 300u 48u "To continue with installation you will need to connect to login.$\n$\n$\n$\nPlease enter your username and password."
>${NSD_CreateLabel} 20u 60u 60u 12u "Username: "
>${NSD_CreateText} 80u 60u 150u 12u $uNameRem
Pop $uName
>${NSD_CreateLabel} 20u 80u 60u 12u "Password: "
>${NSD_CreatePassword} 80u 80u 150u 12u ""
>Pop $pWord
GetDlgItem$0 $HWNDPARENT 1
SendMessage$0 ${WM_SETTEXT} 0 "STR:Login"
>nsDialogs::Show
FunctionEnd
>
Read the documentation for MUI nsis.sourceforge.net/Docs/Modern%20UI/Readme.html it explains everything you need to know to create a form like that.
When it comes to processing I used the "InetLoad" command (explained in NSIS documentation) to send the form variables as post variables to a web service and have that process it. If the web service also returns a document which includes a sucess or fail or similar you can then read that to find out what happened (my service returns an xml document I parsed with the NSIS XML plugin).
Hope this helps get you on the right track.