how to set default value in form input -only for Add- |
how i can add a default value in input form field which user trying Add data. if field is empty this should fill with default value otherwise show the saved value. currently i need it for a dropdown list. for some reasone, have 3 forms on a single table which are specific for their uses.
like a customer specific form to add a Customer it should contain user_type = "customer" if want to add a Rider it should contain user_type = "rider" same requirement in case where i want to restrict on other types of fields like a text, number, date, checkbox etc. please, if possible, have link(s) for different types of solution(s). regards Newbie here in CodeIgniter World !! Please appologize if any nonsense from me.
environment: Windows 10, XAMPP 3.3.0, VS Code, SQLyog Community Ed.
Please read:
PHP NET - Ternary Operator - Example #3 Assigning a default value What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |