Skip to content
Advertisement

Tag: forms

Getting Values from Laravel drop-down form

I have a simple drop-down in a form. The form is: In the view function in the controller the array is: The store function in the controller is: The method, however, stores the position of the values instead of the value itself. So, if I do a dd(request()->all());, I get: How can I get the values instead of the position?

How to add options to a Symfony Form field?

I am rather new to PHP & Symfony, and am struggling with the form options: I have the following, simple code: I get an error because the format is not an option of TextType, but I cannot find a way to add my own options (But I know this is possible, from the others posts I read) I have read

PHP Issue with isset function

I’m making a contact form for my website that uses php to send the inputted information to my email. My issue is that the isset php function returns false. I’m not sure why this is. Here is my php …

check a table in database when a form is saved in php

I have a form which has a save button as shown below: In that form, what I want to achieve is when a user press the save button then it should check a table in the database. The table which I want to get it checked is list_users. list_users has 5 columns: When any user login (let’s user UserA) then:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘feature_item’ & ”status’ cannot be null

in my form when i checked the checkedbox there is no error .but when i don’t want to check the checkedbox, I am getting the error SQLSTATE[23000]: 1048 Column ‘feature_item’ & ”status’ cannot be null. 1.my products table:- 2.my product.blade.php This is my form 3.my ProductsController This error I get: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘feature_item’ & ‘status’ cannot

Advertisement