So I have this input pattern in HTML: <input name=”firstnamereg” type=”text” pattern=”[/p{L}+/u ]+”> But When I use the preg_match it does not work: $regexFirstANDLastname = “/[/p{L}+/u ]+/”; preg_match($regexFirstANDLastname, $_POST[“firstnamereg”]); Answer You need to use This pattern, in Chrome and Firefox, will be compiles as a new RegExp(“^(?:[\p{L}\s]+)$”, “u”) regex object. The u flag is used by default, you do not
Tag: input
Error on input validation even though input exists
I have an application where an user can change his name via a pop-up. This is the method that handles the name change: This is the blade file with the modal: The issue is when I have the required in the request validation I always get the error, when I delete the required everything works perfectly. I need it because
HTML – input field jumps out of html table
I have a ‘dynamic’ table where someone can change info about a person. When clicking on ‘update’ the cell should change to an input field. This works, but somehow the input field jumps out of the table and sits above it. This is part of the function that shows the table: This is the page where the function gets called
Is it possible to use placeholders on ?
I’m currently working on at the displaying of information from a database. I was making a summary site where you can only see the important things of a table. After that i made the first element as an <input type=”submit”> in a <form>, so u can click it and come to the detail site. My problem is now: The value
How to display data inside a single form from database
I am trying to display data from database inside single input form. Let’s say I have 3 rows with column called name. This is how I am getting the rows: So how do i display the data in one input form instead of three? like in the picture attached. Answer When you are doing this: You are essentially creating as
How to submit values in form and save them on another page [PHP]?
so I have 2 pages . On the first page I have a form , where I need to input values and the other page receives those values and saves them. Then I go back to page 1 , input new values and those new values get saved again on page 2 , right next to the previous values. Basically
Allows decimal float numbers in WooCommerce form field type number
I am making an input form in WooCommerce using a function called woocommerce_form_field() for an input type number field like below: Now I would like to be able to allow decimal float numbers to be inputed in this field. Is it possible? What should I do? Answer You need to use ‘custom_attributes’ argument with attribute ‘step’ set to ‘any’ as
how to update a checkbox value on update function on request based?
i written a very simple code to update value of checkbox but it update 1 in db on uncheck it doesnot update 0 if request is submit here is code
How can I auto populate previously uploaded file using html and php?
I want my previously uploaded file to be automatically selected while I am editing details which also include file upload. I have used value attribute as in other types. But this doesn’t work. I have to select the required file again while I am editing details. No file is selected as default while editing. I want to edit other details
how to send multiple checkbox data with `|` delimeter using codeigniter form
I want to send multiple checkbox data using | delimiter in CodeIgniter form In my form, I use the checkbox to select multiple data: <form method="get" action="…