Custom Registration/Sign Up Page Without Using a Plugin step by step tutorial for beginner WordPress

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to online web tutor presented by prophetic solutions team I am Sencha in this video session we will learn about workplace custom registration form tutorial for beginners in the last video session we had seen that how can we create custom login form as well as we have customized the default logon system of WordPress for tutorials in scratch ok so we will see that WordPress assume registration form tutorial just in a single video ok so let's get started about for this customization form and also guys if you're a beginner from this video session then I strongly recommend that please watch our previous video session to make your WordPress custom technical skills in the deal okay so let's get started about customers registration form so basically we have to follow some points to to do our tasks ok so what are those points its have a looked at some of the conceptual points that hydrogen for you these are the points that we have to follow to make our work achievable first we have to create a wordpress page second we have to create a term building themes folder design that template what we have created in step number two to the beach create a new state number one do the station form that to our template file means we have to make a custom form in this template file but we have made and apply form data validations while submitting form to the server we need to violate our date ow okay and finally after validation if there is no error then finally we have to create a user for time and after creating user the user will go into the WP users table okay this is our database we are using right now WP uses table contains the users informations okay all the registered users in our WP sir so after validating the users credentials or you can say user data the finally user has been created and the user will be inserted in WP users table okay so now let's go ahead and make our first system that is create a wordpress page okay the state passed a we will start and do our custom registration for me WordPress so first of all we have to make our custom WordPress page - just click on pages add new and create a registration form okay or you may say registration just click on publish and finally we have created our page just click on this permalink to see this page and here is the page what we have created okay right now there is no contain decided let's make a template file inside our themes folder what actually the second one says okay so just go to our themes for the first so this is our themes folder just click on themes and right now we are currently activated 2073 okay just click on that and within this template means return to create a template file okay so I have made setup here in NetBeans WordPress themes 2017 okay and now just I am going to create a template file inside 2017 just leavin that so let's make the filename actually in small case click rename it and see here is small and R will be also small so we have renamed and we have created our customization template page so let's assign our template name for this so what we have made we have a created custom registration alien side our team's folder and we have a signed template name as the keyword to create a custom template okay and now the third point says that we need to assign this template we need to assign this template to our created WordPress page okay so this is our word phase phase that we have created and we need to assign the create template to this page just refresh this page once more and how in the template section you can just click on this you can say custom registration page what we have created they just click on that and assign this template to this page okay we have assigned that page just go ahead and refresh this page you will see nothing appears because we have assigned successfully okay so let's check by making some content here okay you can say that this is the content that we have written inside our template file okay finally we have attached our template file to this page finally the next one says is that we need to do the registration form go to our template file means we need to make our a station form inside that template okay so just make a form for that yeah it's huge million okay introducer name so we have created our first field that is taking username from the user okay so we have made with the help of input text box to save our time guys I have made a form for that so just go ahead and copy this code let me explain about each section of this input field in a deep ok so just get rid of that and paste all the forms that I have made for you so this is the form that I have created to save a long time first as you can see it's taking username okay it's type text and placeholder okay simple form that we have created and the second it takes the user names or email even from the user and I email should be okay and he HTML is the name P as well as we have created two different fields for password like inter password and confirm password okay so just rename this ignant confirm password and it should be type password okay so we have created four different fields like username email password and confirm password okay so we have created four different fields to this form okay so we need to validate this form while submitting to the server okay so let's submit this form one in without making any validation to it okay and the formatter should be post okay so this is the form that we have created now I am going to submit this form and also I have to make a button submission button here inside this form so input type Sebata so finally this is the form that we have created so far okay so as you can see here now we need to attach hidden footer section for this form of WordPress okay so to do that we to use git header and get for the function of WordPress okay so get footer function is to include what this footer as well as we have get header function to include the header section of WordPress okay so to just save your file go to browser and refresh this page you can see that we have included our header section okay and as well as our footer section with this our custom form okay so now we have to do the form validation for this form but we have created okay because we are going to register this user to this database table okay so while submitting this user wing to validate all these fields individually okay so to value it in this form let's have a looked at what are the required points we need to validate this user while submitting this form to database okay so to validation process we need to check these six points first the user name should not have by space within that okay means when we enter any username in username to this form means to this input box then means check that username has no space within that okay and the second point says that the username has must has a value means it should not be the empty value okay obviously if we are going to create a user interface table that means to check that user logging means user name should not have empty reviews it and the third thing is that user name existence as well as we have to check that if we are going to register this user to this database table then I mean to check that user already exists or not it exists and we need to restrict the user while creating that user okay and the next one says that the email the email we are entering into this input box is valid or not if it is not valid an me to give a message to the user that email is not valid okay means a valid email should be registered to this database table okay under this user in the section and the next one says that the email existence obviously we need to check that this email is already exist in yet of a stable or not if it exists then we need to give a message to the user that this email is already exist in the database table okay so these are the validation related with username and email finally we need to check the password and confirm password match it means if password and confirm password match then we need to pass this form to the server otherwise we have to give these error messages to the user okay so these are the validations guys that we need to give to our custom form to validate a user if all the six points passes exclusive fully then in that condition we need to create our custom user to the database table okay so let's go ahead to our custom form and we need to validate all these warrants state-by-state okay so all we have done we have created this form as you can see now we have to do our validation to submit this form okay so let's get started about validation so if just I am writing if post okay now we have submitted our form to database table okay and now we need to check so before applying any validation let's read all the values inside our form solution okay so first they have a username so this is the name attribute TXE username as you can see we have supplied to this form okay and now we have to use our Google offset WPTV okay and we have used escape method for that which actually takes the valid values of txt username or not okay so we have successfully read our user name from this input text box and now let's read email for that successfully we have collected email value also over so let's collect password and finally we need to collect our confirm password - okay so just make it confirm password okay and the name attribute of confirm password as you can see txt confirm password so just copy this name and paste it here so all we have done now we have collected our four different values from our customer registration form okay so let's apply first valuations what we have seen inside that that username has no space inside it okay as you can see this is our first point okay we check the username has no space value so just copy this is table go to your form and let's apply if a string position guys STR POS is a PHP function which takes the position of this applied second character inside that - I have passed a space okay as you can see so we need to check that username has a space value or not if it's not equal to equal to false it means the true value returned by this function it means our space is there okay so we need to restrict the user while entering any space value inside T star so let's make an array of that okay so that we can store our error messages inside this variable okay this is just me a username a space key okay this is the key guys according to a need you need to supply inside this array and will it's possum s is that like username has empty value sorry empty belly no space okay so this is the mass that message that I have just assigned this key array like user name space okay means their existence of space inside this username let's check under that username has no empty value okay you mean if username has empty value than to supply error messages like like keys using a empty mrs. username must okay means we need our username obviously to his store user so these are the messages we need to store in our key so we have a negated successfully our two coins first we have checked our space inside username also we have checked the username has empty values or not okay and now the third thing we need to use about username existence okay as you can see username existence so this is a four piece function guys if you go to the documentation section of username exists and you could find a matter inside username existence as you can see into the documentation section okay so cheap way that argues any given username exists or not means if we pass any string value inside this function then it checks the user existence from TV table if it exists then it returns true otherwise returns false okay so you can read false the user ID on success means false and failure okay so let's use this function to our form okay so just we walk and copy this function name and this state if username exists and this is the username that we need to check okay so just pass this variable inside that and if username exists okay so let's pass a username exists as a key and write a message that username already exists okay so this is the message that are here stored inside that key that use an eMac system okay and now the next thing you need to check that the email is valid or not so to do that we need to use is email okay this is the workplace function guys that after taking email okay it takes that it has a valid email or not okay so just you before using that if you go to the documentation section all is emailed and you can find our good resource inside that link okay very finds that an email is valid or not bring it to pass give me the string inside that function okay so if you go to scroll down then we need to check that email address to verify and return false or means boolean value either true or false okay so let's check is valid now let's state exclamation sign means the email is not valid so in that condition we to store our message like email valid okay and email has valid value inside that okay so this is the email we have checked that email is valid or not so let's check the another state is that email exists okay if the email already already exists inside our database table that it returns true otherwise false value okay so just copy this function and before using this function guys if you go to the documentation section and read a good talk inside that link email exists check whether the given link email exists or not okay so we will use this function to check our email exists so let's use that function if email exists I need to pass our email variable inside that okay so we've email already exist okay so let's check email existence already exists okay we have a related our string position inside username also we have check username has value or not username exists email valid or not another email existence okay so step by step we have applied all these validations instead of the last one that is password patched or not so let's go ahead and an Atty under the validation so the extra password sorry password okay equal to equal to its txt confirm password if these two values are not equal so let's go ahead and use STR cmp okay this is a PHP function which basically checks that two given string are has same value are not okay so we need to check that confirm password or txt password means both these passwords are saying or not if it returns equal to equal to zero men's values has not matched to each of them than we need to store of error message inside that password and we have to store message like password didn't match okay so step by step guys we have seen that how can we validate our form from our user assistance to our password validation okay so step by step we have applied all these validations one by one okay so let's wait and paint our error message error variable okay and it's nerdi so let's go back to our custom form what we have made okay so without empty entry means putting any values to this form it's go ahead and submit this form so just to contact as you can see first error message has given username empty okay needed username must as well as email valid email has no valid okay so these two values are we are getting so after passing this value means we need to check the count of this error variable if count of error equal to equal to zero means obviously we know that when each error occurs inside this form then this array has some value okay because we have to clear error as a variable or re okay so if the count is zero means there is no error inside that so we need to create a user for that in that condition because our form has passes successfully all the validation okay so to create a user in database table in WordPress setup we need to use the function called WP create user okay as you can see WP create user here we need to pass our username password and people so these are the things that we need to pass while creating our user okay so just go ahead and copy this name and proves inside discount so so we need to pass the first thing is that username okay and the second thing is that password okay and the third thing is email so email okay so these are the variables that we have collected for malformed we have validated this before creating user and finally we need to create that user okay and a message there like user created successfully okay and exists in that condition so successfully guys we have a little terror or we have made our form we evaluated and finally we need to check that any error has gone actually error variable contains or not if it does not contain error any other value Tanvi to create a user in that condition okay so just go ahead and refresh this page once more so let's pass let's say just and also be to very rate guys that if it contains County coordinator than one that equal masses like all fields all just simply print all error message that actually we have stored inside error evil okay so we have general just to trace this page and let's click on submit button without putting any values then we can say username empty so let's pass about Sanchez a username he may have Sanjay f11 at gmail.com and password something like Sanjay and act me as my confirm password okay so just click on submit as you can see password didn't match obviously because in the first password input field we have passed a password called Sanjay and in the second section we have passed admin okay so let's pass all valid values inside tak okay so let's pass Center as a password and confirm password is false is unchecked so just click on submit you can see a user created successfully okay so just go to our database and refresh this WP users table once more you can see that the center has successfully created to our database table of the guys so we have created our custom user form we have validated or form as well as we have created our user successfully to our database okay so all we have seen is Tobias team so let's look at this user and check about the credentials what we have retained inside for Sanjay as a user okay so let's open another incoming - symbol just prove that URL what we have copied and enter that so let's enter the credential for the center user what we have created from our custom form okay the username should be in J and the password essentially just click on login as we can see we have successfully login to our WordPress database admin panel okay so one more thing guys that I want to tell you that if you are creating a user form or custom form tan according to the user role according to the user role actually the dashboard decides which interface actually users see after logging so if you go to the registration form okay just go to the user section okay of admin because we have logged in as an admin okay so you can see that two users create a right now first admins itself and the second the user ok just click on that so we you will see that vines calling the user has the role of subscriber okay so if if the user has a author or administrator permission that in the ad which administrator condition it actually sees all the fields as you can see all the menus and the WP menu bar and as all the interfaces for this admin panel okay but right now the center user has existence as a subscriber so - both filters and it actually shows the subscriber task mode okay so it's a homework for you guys that you need to decide that when creating any user from your custom form how could actually store the user role also okay so it's a homework for you how can we assign the user role when creating a user inside your WP custom form okay so you step-by-step guys we have seen all steps we need to follow actually creating our custom user input press setup okay guys so if you're big nerd guys from this video session then you can also watch our previous video session like where we did custom login info page as well as we have customized the focus default login system and also we have made several video sessions about WordPress ok guys so if you have any query regarding this video session guys then just drop your comment I will remind you as soon as possible so for this video session guys thank you for watching have a great day
Info
Channel: Online Web Tutor
Views: 52,487
Rating: undefined out of 5
Keywords: WordPress Custom Registration Page/sign up, How to Create a Custom registration Page for WordPress, Build a Custom WordPress registration/sign up, wordpress custom registration url, step by step registration page development in wordpress, wordpress custom registration page tutorial in easy steps, wordpress custom registration page, wordpress custom registration form, wordpress custom registration form code, online web tutor, How to Build a Custom WordPress registration Page
Id: LTNUSb_5zA8
Channel Id: undefined
Length: 29min 59sec (1799 seconds)
Published: Tue Jan 23 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.