Create a Student Registration form using VisualForce, Apex part 1



Here I have created a Visual force page for student registration and added some images, buttons, and a registration form.


And creating validations on controller in next post...
















<apex:page>
<center>
  <apex:image url="https://c.na172.visual.force.com/resource/1587619471000/Background?" height="400px" width="1200px" styleClass="imageStyle"/>
      <div>       
  <!-- Begin Default Content REMOVE THIS -->
  <h1>Congratulations</h1>
     </div>
   <div>
    <body style=" background-image:url('{!$Resource.BackgroundHome}');" background-repeat="no-repeat" background-attachment="fixed" background-position="center"></body>
    <h> This is your new Page</h>                 
   </div>
  <!-- End Default Content REMOVE THIS -->
  </center>
     <style>
        #ct{
        text-align:center;
        font-size: xx-large;
        }
    </style>
    <apex:form id="ApplicationPage" >
    <center>

        <div id="ct">
            <h> WELCOME TO THE WEBSITE </h>
        </div>
    </center>
        <apex:pageBlock title="">
            <apex:pageBlockSection columns="40"><h1><apex:CommandButton value="HOME" onclick="myFunction()"/>
        <apex:CommandButton value="MY PROFILE" onclick="myFunction()" />
        <apex:CommandButton value="MY APPLICATIONS" onclick="myFunction()" />
         <!--<apex:CommandButton value="LOGOUT" onclick="myFunction()" />-->
                </h1>
            </apex:pageBlockSection>
         </apex:pageBlock>
    <center>
         <apex:outputPanel >
        <div align="center" draggable="false" >           
            <apex:commandButton action="{!save}" value="Save" id="saveButton" reRender="Panel" />        
            &nbsp;&nbsp;&nbsp;&nbsp;
            <apex:commandButton value="Cancel" onclick="window.close();" immediate="true"/>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <apex:CommandButton value="LOGOUT" onclick="myFunction()" />
        </div>
         </apex:outputPanel>
    </center>
    </apex:form>
     <apex:pageBlock title="Application Registration">
        <apex:pageBlockSection title="Fill the Form">
            <center>
            <apex:page id="page" sidebar="false">>
     <apex:form id="form">
     <apex:pageBlock id="block">
   <apex:pageBlockSection columns="1" id="section">
    <apex:pageBlockSectionItem id="item1">
    <apex:outputLabel >First Name</apex:outputLabel>
    <apex:inputText id="inp1" onkeypress="this.value=this.value.toUpperCase();" onblur="this.value=this.value.toUpperCase();"/>
    </apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="item2">
    <apex:outputLabel >Last Name</apex:outputLabel>
<apex:inputText id="inp2" onkeypress="this.value=this.value.toUpperCase();" onblur="this.value=this.value.toUpperCase();" />
    </apex:pageBlockSectionItem>
   
    <apex:pageBlockSectionItem id="item3">
    <apex:outputLabel >Address</apex:outputLabel>
    <apex:inputTextarea id="inp3"/>
    </apex:pageBlockSectionItem> 
    <apex:pageBlockSectionItem id="item4">
    <apex:outputLabel >Email id</apex:outputLabel>
    <apex:inputText id="inp4"/>
    </apex:pageBlockSectionItem>
    <apex:pageBlockSectionItem id="item5">
    <apex:outputLabel >Mobile Number</apex:outputLabel>
    <apex:inputText id="inp5" maxlength="10" onkeypress="mob()" />   
    </apex:pageBlockSectionItem> 
     <apex:commandButton value="submit" onclick="validate()"/>  
   </apex:pageBlockSection>
  </apex:pageBlock>
 </apex:form>
</apex:page>
  </center>
        <!--
            <apex:inputFile value="{!attachment.body}" filename="{!attachment.name}"/>
            <apex:commandButton value="Upload and save" action="{!save}"/> -->
        </apex:pageBlockSection> 
    </apex:pageBlock>
</apex:page>

Comments

Popular posts from this blog

Bind Variables in a SOQL Query - getContactIDWithBinds

Superbadges Doubts