<section class="gradient-custom">
<div class="container py-5 h-100">
<div class="row justify-content-center align-items-center h-100">
<div class="col-12 col-lg-9 col-xl-7">
<div class="card shadow-2-strong card-registration" style="border-radius: 15px;">
<div class="card-body p-4 p-md-5">
<h3 class="mb-4 pb-2 pb-md-0 mb-md-5">Registration Form</h3>
<form [formGroup]="registrationFrom">
<div class="row">
<div class="col-md-6 mb-4">
<div class="form-outline">
<input type="text" id="firstName" class="form-control form-control-lg" formControlName="firstName" />
<label class="form-label" for="firstName">First Name</label>
</div>
</div>
<div class="col-md-6 mb-4">
<div class="form-outline">
<input type="text" id="lastName" class="form-control form-control-lg" formControlName="lastName"/>
<label class="form-label" for="lastName">Last Name</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-4 d-flex align-items-center">
<div class="form-outline datepicker w-100">
<input type="text" class="form-control form-control-lg" id="birthdayDate" formControlName="DOB" />
<label for="birthdayDate" class="form-label">Birthday</label>
</div>
</div>
<div class="col-md-6 mb-4">
<h6 class="mb-2 pb-1">Gender: </h6>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio"
value="male" checked formControlName="gender" />
<label class="form-check-label">Male</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio"
value="female" formControlName="gender"/>
<label class="form-check-label">Female</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-4 pb-2">
<div class="form-outline">
<input type="email" id="emailAddress" class="form-control form-control-lg" formControlName="email" />
<label class="form-label" for="emailAddress">Email</label>
</div>
</div>
<div class="col-md-6 mb-4 pb-2">
<div class="form-outline">
<input type="tel" id="phoneNumber" class="form-control form-control-lg" formControlName="phoneNumber" />
<label class="form-label" for="phoneNumber">Phone Number</label>
</div>
</div>
</div>
<label for="" class="mt-3">Address : </label>
<div class="px-5" formGroupName="address">
<div class="form-group mt-3">
<label class="pb-2">Country</label>
<select class="form-select form-select-lg mb-3" formControlName="country">
<option value="" disabled hidden>Select Country</option>
<option *ngFor="let country of countryList" value="{{country?.id}}">{{country?.value}}</option>
</select>,
</div>
<div class="form-group">
<label class="pb-2">City</label>
<input type="text" class="form-control form-control-lg" formControlName="city">
</div>
<div class="form-group">
<label class="pb-2">Street</label>
<input type="text" class="form-control form-control-lg" formControlName="street">
</div>
<div class="form-group">
<label class="pb-2">PinCode</label>
<input type="text" class="form-control form-control-lg" formControlName="pinCode">
</div>
</div>
<div class="mt-4 pt-2">
<button class="btn btn-primary mx-1" (click)="register()">Register</button>
<button class="btn btn-success mx-1" (click)="setValuesToFrom()">SetValue</button>
<button class="btn btn-warning" (click)="reset()">Reset</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
// make instance of queryBuilder in construtor and use below ts file code
registrationFrom = this.fb.group({
firstName : [''],
lastName : [''],
DOB : [''],
gender : ['male'],
email : [''],
phoneNumber : [''],
address : this.fb.group({
country : [''],
city : [''],
street : [''],
pinCode : ['']
})
})
.gradient-custom {
/* fallback for old browsers */
background: #f093fb;
/* Chrome 10-25, Safari 5.1-6 */
background: -webkit-linear-gradient(to bottom right, rgba(240, 147, 251, 1), rgba(245, 87, 108, 1));
/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
background: linear-gradient(to bottom right, rgba(240, 147, 251, 1), rgba(245, 87, 108, 1))
}
.card-registration .select-input.form-control[readonly]:not([disabled]) {
font-size: 1rem;
line-height: 2.15;
padding-left: .75em;
padding-right: .75em;
}
.card-registration .select-arrow {
top: 13px;
}