There is no interaction when clicking the button - html

error
<form [formGroup]="signUpForm">
<div class="form-group pt-3">
<div class="input-field">
<span class="fa fa-user p-2"></span>
<input formControlName="firstName" type="text" placeholder="Ad">
</div>
</div>
<small
*ngIf="signUpForm.controls['fistName'].dirty && signUpForm.hasError('required', 'firstName')"
class="text-danger">*Ad gerekli!</small>
<div class="form-group pt-3">
<div class="input-field">
<span class="fa fa-user p-2"></span>
<input formControlName="lastName" type="text" placeholder="Soyad">
</div>
</div>
<small
*ngIf="signUpForm.controls['lastName'].dirty && signUpForm.hasError('required', 'lastName')"
class="text-danger">*Soyad gerekli!</small>
<div class="form-group pt-3">
<div class="input-field">
<span class="fa fa-envelope p-2"></span>
<input formControlName="email" type="text" placeholder="E-mail">
</div>
</div>
<small
*ngIf="signUpForm.controls['email'].dirty && signUpForm.hasError('required', 'email')"
class="text-danger">*E-mail gerekli!</small>
<div class="form-group pt-3">
<div class="input-field">
<span class="fa fa-user p-2"></span>
<input formControlName="userName" type="text" placeholder="Kullanıcı Adı">
</div>
</div>
<small
*ngIf="signUpForm.controls['userName'].dirty && signUpForm.hasError('required', 'userName')"
class="text-danger">*Kullanıcı Adı gerekli!</small>
<div class="form-group pt-3">
<div class="input-field">
<span class="fa fa-lock p-2"></span>
<input formControlName="password" [type]="type" placeholder="Şifre">
<span (click)="hideShowPass()" class="fa {{eyeIcon}}"></span>
</div>
</div>
<small
*ngIf="signUpForm.controls['password'].dirty && signUpForm.hasError('required', 'password')"
class="text-danger">*Şifre gerekli!</small>
<button type="submit" style="background-color: black; color:white;"
class="btn btn-black btn-block mt-4 w-100" (click)="onSignUp()">Kayıt Ol</button>
<div class=" text-center pt-4 text-muted">Zaten bir hesabın var mı? <a id="forget"
routerLink="/login">Oturum Aç</a>
</div>
</form>
`
This is my angular signup form but when I click the submit "(kayıt ol)" button, there is no interaction and a frame appears around the password section. How can I fix this? (When you click the Submit button, it should give a warning because there are spaces.)

Related

the html text input that i create using jquery and add more button is not sending any value in post method

i have a simple question hope you can help me .
I have a form and there are some in put fields that i add by addmore button .. but when i add file and descriptions it s not sending values..here is my form
<div class="row clone">
<div class="col-md-6">
<label class="mr-2 ml-2">Görsel</label>
<div class="input-group control-group ml-2">
<input type="file" name="image_name[]" class="form-control">
</div>
</div>
<div class="col-md-6">
<label class="mr-2 ml-2">Meta Açıklama</label>
<div class=" input-group mr-2 ">
<input type="text" name="image_description[]" class="form-control">
<span id="addFile" class="btn btn-success ml-2 mr-2">
<i class="fa fa-plus-circle "></i></span>
</div>
</div>
</div>
<div class="hidden row" style="display:none;">
<div class="row removeable col-md-12">
<div class="col-md-6 ">
<label class="mr-2 ml-2">Görsel</label>
<div class="input-group ml-2">
<input type="file" class="form-control" name="image_name[]">
</div>
</div>
<div class="col-md-6">
<label class="mr-2 ml-2">Meta Açıklama</label>
<div class="input-group control-group ml-2 ">
<input type="text" name="image_description[]" class="form-control" >
<span class="btn btn-danger ml-2 mr-1 removeBtn">
<i class="fa fa-times"></i></span>
</div>
</div>
</div>
</div>
and i create this extra file input by addmore button with jquery below
$("#addFile").click(function() {
var lsthmtl = $(".hidden").html();
$(".clone").append(lsthmtl);
});
$("body").on("click", ".removeBtn", function() {
$(this).parents(".removeable").remove();
});
but when i checked the request , only first file and description input values are coming..the inputs that i created by addmore button are nt sending values.Is there anyone have any idea ??

Bootstrap Form Layout problems

I've been trying to get a basic Bootstrap form layout to work but with no success for a while now.
Basically, all I want is for the avatar to be on the left and then the 4 inputs to the right side of it, grouped in 2 columns. This is what I have but there's spacing I can't get rid of: https://prnt.sc/u8xeft
My code:
<div class="card-body">
<div class="form-group row">
<div class="col-lg-2">
<div class="image-input image-input-outline" id="kt_image_1">
<div class="image-input-wrapper" style="background-image: url(/app/assets/img/users/<?php echo $userInfo[0]['avatar_path'];?>/avatar.jpg)"></div>
<label class="btn btn-xs btn-icon btn-circle btn-white btn-hover-text-primary btn-shadow" data-action="change" data-toggle="tooltip" title="" data-original-title="Change avatar">
<i class="fa fa-pen icon-sm text-muted"></i>
<input type="file" name="profile_avatar" accept=".png, .jpg, .jpeg"/>
<input type="hidden" name="profile_avatar_remove"/>
</label>
<span class="btn btn-xs btn-icon btn-circle btn-white btn-hover-text-primary btn-shadow" data-action="cancel" data-toggle="tooltip" title="Cancel avatar">
<i class="ki ki-bold-close icon-xs text-muted"></i>
</span>
</div>
</div>
<div class="col-lg-5">
<label>Nome próprio:</label>
<input type="text" name="firstName" class="form-control" value="<?php echo $userInfo[0]["first_name"];?>" autocomplete="off" required/>
<div class="invalid-feedback">
Por favor insira um nome válido
</div>
</div>
<div class="col-lg-5">
<label>Apelido:</label>
<input type="text" name="lastName" class="form-control" value="<?php echo $userInfo[0]["last_name"];?>" autocomplete="off" required/>
<div class="invalid-feedback">
Por favor insira um apelido válido
</div>
</div>
</div>
<div class="form-group row">
<div class="col-lg-2"></div>
<div class="col-lg-5">
<label>Telefone:</label>
<div class="input-group">
<div class="input-group-prepend"><span class="input-group-text"><i class="la la-phone"></i></span></div>
<input type="tel" name="telephone" minlength="9" maxlength="9" class="form-control" value="<?php echo $userInfo[0]["telephone"];?>" autocomplete="off" required/>
<div class="invalid-feedback">
Por favor insira um número de telefone válido
</div>
</div>
</div>
<div class="col-lg-5">
<label>Email:</label>
<div class="input-group">
<div class="input-group-prepend"><span class="input-group-text"><i class="la la-at"></i></span></div>
<input type="email" type="email" name="email" class="form-control" value="<?php echo $userInfo[0]["email"];?>" autocomplete="off" required/>
<div class="invalid-feedback">
Por favor insira um email válido
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="row">
<div class="col-lg-3">
<button id="btn_save" name="submit" type="submit" class="btn btn-primary mr-2" style="background: linear-gradient(45deg, rgba(3,130,138,1) 50%, rgba(176,209,51,1) 100%);color: white;border: white;" disabled><i class="far fa-save"></i> Guardar</button>
<button type="reset" class="btn btn-secondary mr-2">Cancelar</button>
</div>
</div>
Change Your HTML Like
<div class="card-body">
<div class="form-group row">
<div class="col-lg-2">
<div class="image-input image-input-outline" id="kt_image_1">
<div class="image-input-wrapper"
style="background-image: url(/app/assets/img/users/<?php echo $userInfo[0]['avatar_path'];?>/avatar.jpg)">
</div>
<label class="btn btn-xs btn-icon btn-circle btn-white btn-hover-text-primary btn-shadow"
data-action="change" data-toggle="tooltip" title="" data-original-title="Change avatar">
<i class="fa fa-pen icon-sm text-muted"></i>
<input type="file" name="profile_avatar" accept=".png, .jpg, .jpeg" />
<input type="hidden" name="profile_avatar_remove" />
</label>
<span class="btn btn-xs btn-icon btn-circle btn-white btn-hover-text-primary btn-shadow"
data-action="cancel" data-toggle="tooltip" title="Cancel avatar">
<i class="ki ki-bold-close icon-xs text-muted"></i>
</span>
</div>
</div>
<div class="col-lg-10">
<div class="row">
<div class="col-lg-6">
<label>Nome próprio:</label>
<input type="text" name="firstName" class="form-control" value="" autocomplete="off" required />
<div class="invalid-feedback">
Por favor insira um nome válido
</div>
</div>
<div class="col-lg-6">
<label>Apelido:</label>
<input type="text" name="lastName" class="form-control" value="" autocomplete="off" required />
<div class="invalid-feedback">
Por favor insira um apelido válido
</div>
</div>
<div class="col-lg-6">
<label>Telefone:</label>
<div class="input-group">
<div class="input-group-prepend"><span class="input-group-text"><i
class="la la-phone"></i></span></div>
<input type="tel" name="telephone" minlength="9" maxlength="9" class="form-control" value=""
autocomplete="off" required />
<div class="invalid-feedback">
Por favor insira um número de telefone válido
</div>
</div>
</div>
<div class="col-lg-6">
<label>Email:</label>
<div class="input-group">
<div class="input-group-prepend"><span class="input-group-text"><i
class="la la-at"></i></span></div>
<input type="email" type="email" name="email" class="form-control" value=""
autocomplete="off" required />
<div class="invalid-feedback">
Por favor insira um email válido
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="row">
<div class="col-lg-3">
<button id="btn_save" name="submit" type="submit" class="btn btn-primary mr-2"
style="background: linear-gradient(45deg, rgba(3,130,138,1) 50%, rgba(176,209,51,1) 100%);color: white;border: white;"
disabled><i class="far fa-save"></i> Guardar</button>
<button type="reset" class="btn btn-secondary mr-2">Cancelar</button>
</div>
</div>
https://jsfiddle.net/lalji1051/k6wrhq0y/4/
You have one row for image, first name, last name and another row for Email and Telephone.
You should group Email with last name and telephone with first name.
your structure could be sth like this:
-Row
|
|-Col Image
|-Col
|- Row Name Propio
|- Row Telefone
|-Col
|- Row Apelido
|- Row Email

How to include fontawesome icons inside Bootstrap forms in WordPress (with CF7)?

I'm trying to make WordPress theme based on Bootstrap4. Everthing is going fine, but I stock with my contact form, which looks like this:
Here is my code:
<form method="POST">
<div class="input-group input-group-lg mb-3 mt-5">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fas fa-user"></i>
</span>
</div>
<input type="text" class="form-control" placeholder="Imię i nazwisko" name="full_name">
</div>
<div class="input-group input-group-lg mb-3">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fas fa-envelope-open"></i>
</span>
</div>
<input type="text" class="form-control" placeholder="E-mail" name="email">
</div>
<div class="input-group input-group-lg mb-3">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fas fa-pencil-alt"></i>
</span>
</div>
<textarea class="form-control" placeholder="Treść wiadomości" rows="5" name="message"></textarea>
</div>
<input type="submit" value="Wyślij wiadomość" class="btn btn-primary btn-block btn-lg">
The problem is, I don't know how to transform this into a WordPress theme. I added Form in Contact Form 7, like this:
[text* your-name class:form-control class:mb-3 class:mt-5 placeholder "Imię i nazwisko"]
[email* your-email class:form-control class:mb-3 placeholder "Adres e-mail"]
[textarea your-message class:form-control class:mb-3 placeholder "Wiadomość"]
[submit class:btn class:btn-primary class:btn-block class:btn-lg "Wyślij"]
and <?php echo do_shortcode( '[contact-form-7 id="5" title="Formularz kontaktowy"]' ); ?> in my index.html.
It works fine and even has some Bootstrap styles, but looks nothing like in the picture. Especially I don't know how to set the size of my fields and, more important, how to include this fancy little icons in them?
As a beginner, I will appreciate any advice that would help me solve my issue.
You can use html in your contact form 7 form editor.
Replace this code in Contact form 7 => Form text area.
<div class="input-group input-group-lg mb-3 mt-5">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fas fa-user"></i>
</span>
</div>
[text* your-name class:form-control class:mb-3 class:mt-5 placeholder "Imię i nazwisko"]
</div>
<div class="input-group input-group-lg mb-3">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fas fa-envelope-open"></i>
</span>
</div>
[email* your-email class:form-control class:mb-3 placeholder "Adres e-mail"]
</div>
<div class="input-group input-group-lg mb-3">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fas fa-pencil-alt"></i>
</span>
</div>
[textarea your-message class:form-control class:mb-3 placeholder "Wiadomość"]
</div>
[submit class:btn class:btn-primary class:btn-block class:btn-lg "Wyślij"]

Angular 2 Unexpected closing tag

Im having trouble with Angular 4 and html. I get unexpected closing tag first. When I remove the form closing tag, then I get the same error but with .
Im a rookie by the way, so it may be a very dumb mistake. Here is the code, thanks!
<div class="app flex-row align-items-center">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-6">
<div class="card mx-2">
<div class="card-block p-2">
<h1>Register</h1>
<p class="text-muted">Create your account</p>
<form *ngIf="creatingUser"
class="example-form"
(ngSubmit)="onSubmit(userForm)"
#userForm="ngForm"
fxFlexFill [fxLayout]="'row'"
fxLayoutAlign="center start">
<div class="input-group mb-1">
<span class="input-group-addon"><i class="icon-user"></i></span>
<input type="text" fxFlex="100"
required
minlength="3"
placeholder="Username"
[(ngModel)]="user.profile.username"
name="username"
#username="ngModel">
</div>
<div class="input-group mb-1">
<span class="input-group-addon">#</span>
<input type="text" placeholder="Email" name="email" #email="ngModel" id="email"
required
pattern="^\w+([\.-]?\w+)*#\w+([\.-]?\w+)*(\.\w{2,3})+$"
placeholder="Email"
[(ngModel)]="user.profile.email">
</div>
<div class="form-group row">
<label class="col-md-3 form-control-label" for="select">Select role</label>
<div class="col-md-9">
<select id="select" name="select" size="1" placeholder="Role" [(ngModel)]="user.role" name="role">
<option *ngFor="let role of roles" [value]="role">{{role.name}}</option>
</select>
</div>
</div>
<div class="input-group mb-1">
<span class="input-group-addon"><i class="icon-lock"></i></span>
<input type="password" placeholder="Password" name="password" #password="ngModel"
required
minlength="6"
[(ngModel)]="user.password">
</div>
<div class="input-group mb-2">
<span class="input-group-addon"><i class="icon-lock"></i></span>
<input class="form-control" name="repeatPassword" #repeatPassword="ngModel"
validateEqualTo="password"
type="password"
required
placeholder="Confirm Password"
[(ngModel)]="user.confirmPassword">
</div>
<button type="button" class="btn btn-block btn-success">Create Account</button>
<button type="button"
[color]="'warn'"
(click)="creatingNewUser(false)">
</button>
<button type="submit"
[color]="'primary'"
[disabled]="!userForm.form.valid">
</button>
</form>
<div *ngIf="!creatingUser">
<button [color]="'primary'" (click)="creatingNewUser(true)">
</button>
</div>
<div class="card-footer p-2">
<div class="row">
<div class="col-6">
<button class="btn btn-block btn-facebook" type="button"><span>facebook</span></button>
</div>
<div class="col-6">
<button class="btn btn-block btn-twitter" type="button"><span>twitter</span></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
You have one extra </div> at bottom. You can check it here - html linter

How to fix this strange padding in bootstrap form?

<form class="form-inline">
<div class="form-group">
<div class="input-daterange input-group" id="datepicker">
<label>From:</label>
<input type="text" class="input-sm form-inline" name="start" />
<span class="input-group-addon"><i class="fa fa-calendar fa-lg" aria-hidden="true"></i></span>
</div>
</div>
<div class="form-group">
<div class="input-daterange input-group" id="datepicker">
<label>To:</label>
<input type="text" class="input-sm form-inline" name="end" />
<span class="input-group-addon"><i class="fa fa-calendar fa-lg" aria-hidden="true"></i></span>
</div>
</div>
</form>
when I change class="form-control" for input, it will be ok, but it also change size of whole form :(
Solve:
<form class="form-inline">
<div class="form-group">
<div class="input-daterange" id="datepicker">
<span>From:</span>
<div class="input-group">
<input type="text" class="input-sm form-inline" name="start"/>
<span class="input-group-addon"><i class="fa fa-calendar fa-lg" aria-hidden="true"></i></span>
</div>
</div>
</div>
<div class="form-group">
<div class="input-daterange" id="datepicker">
<span>To:</span>
<div class="input-group">
<input type="text" class="input-sm form-inline" name="end"/>
<span class="input-group-addon"><i class="fa fa-calendar fa-lg" aria-hidden="true"></i></span>
</div>
</div>
</div>
</form>