Questions tagged [codeigniter-form-helper]

Form Helper is a set of functions that help the user when working with forms in CodeIgniter.

Form Helper is a set of functions that make it easier for the user to work with forms in CodeIgniter. Among the Form helper functions are functions for generating form HTML controls - inputs, buttons, as well as the wrapping form tag.

106 questions
15
votes
10 answers

Codeigniter - Date format - Form Validation

I'm using codeigniter with PHP. I'm using following form, DOB: here, #dob…
KarSho
  • 5,699
  • 13
  • 45
  • 78
11
votes
2 answers

adding class and id in form_dropdown

Is there any possible way of adding class and id attributes in form_dropdown of CodeIgniter? I tried form_dropdown('name',$array,'class','id') and it's not changing anything, please tell me how to implement it? Edited: with my dropdown form like…
7
votes
6 answers

how to create a multi select box with out selected options codeigniter

hi i am using codeigniter , i want to add a multi select box to my page , i saw the codeigniter user guide example , but what it is doing is set the values in multi select . like this $options = array( 'small' => 'Small…
Kanishka Panamaldeniya
  • 17,302
  • 31
  • 123
  • 193
4
votes
3 answers

How to Repopulate a form field without setting rule as required in Codeigniter?

When I try to populate a form field which is not required in form validation doesn't repopulate. Let's say I have a field but I don't want it to be required but I want it to be repopulated. How can I do it ? I think this is a bug for codeigniter.
SNaRe
  • 1,997
  • 6
  • 32
  • 68
4
votes
5 answers

Codeigniter - Form helper set_select()

How can I use set_select() (part of the form helper) on my dropdown array in codeigniter: It is used to remember which option the user has selected. $guide_options = array('investments' => 'Investments', 'wills' => 'Wills', …
hairynuggets
  • 3,191
  • 22
  • 55
  • 90
4
votes
3 answers

select box validation in Codeigniter

i am new to Codeigniter and I have some trouble in select box validation. I want default select value at beginning. how can i…
Sadaf Sid
  • 1,510
  • 3
  • 17
  • 30
4
votes
3 answers

CodeIgniter form_validation->run() always returns false?

I'm new to CodeIgniter and I've been trying to implement a form submitting function, however whenever I press "submit" the form page simply refreshes and the database is not updated! It seems that the $this->form_validation->run() is always…
Cloud Strife
  • 99
  • 2
  • 2
  • 7
3
votes
2 answers

Should I use CodeIgniter html or form helper class?

Is it good for performance or security issue to use those class as we know that HTML should be in plain HTML. e.g. is better than '; ?> Then why should we use echo…
Sourav
  • 17,065
  • 35
  • 101
  • 159
3
votes
1 answer

Form helper in codeigniter autoescapes form data?

I've got the following code: echo form_submit('Update Info', icon('accept') . ' Update Info', 'class="button medium green"');, which outputs a styled submit button. The icon function returns the image embed code to the proper icon. Unfortunately it…
Cyclone
  • 17,939
  • 45
  • 124
  • 193
3
votes
2 answers

Codeigniter doesn't let me update entry, because some fields must be unique

So what I'm trying to do: Pull User data from database, including email address, username etc. Edit it Save it But I want to keep username and email unique. And for this I'm setting validation rules like…
Tachi
  • 2,042
  • 3
  • 27
  • 44
3
votes
3 answers

How can i put HTML5 required field using form_input() function in Codeigniter framework

I am new in codeigniter.But now i am developing a project using codeigniter. My Html code like this: Now i want to convert it through function form_input() function.I…
ahs
  • 107
  • 2
  • 8
3
votes
1 answer

Multi-select does not retain value after post in codeigniter

I have a form in my application with a multi select. I'm using CI's form helper to build my forms, so the build of the element looks like this: return form_multiselect('authors[response][]', $faculty->get_all_for_multiselect(), …
Joel Kinzel
  • 969
  • 2
  • 7
  • 19
2
votes
2 answers

CodeIgniter: Controller structure for forms with many inputs

I'm developing a site using CodeIgniter and am trying to adhere to the "Fat Model / Skinny Controller" paradigm, but am running into some problems when it comes to pages containing forms with a number of inputs. The code below is what I'm using to…
2
votes
1 answer

codeIgniter form validation doesn't work when passing view as string

I am currently learning CodeIgniter and using it for a small project. I would like to make a template so that I don't need to write repeated code for the views. I like jruzafa's answer in this post: How to Deal With Codeigniter Templates? In…
Jason
  • 119
  • 6
2
votes
2 answers

Codeigniter 3 textarea

I have tried to limit number of rows in textarea to 4 but its giving error Message: Array to string conversion this is my code of textarea using helper class $textarea_options = array('class' => 'form-control','rows' => 4, 'cols' => 40); echo…
1
2 3 4 5 6 7 8