⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Create password & hidden fields in the form



abhilash
  • profile picture
  • Member

Posted 22 December 2011 - 10:59 AM

Hi,

I would like to add a password input field in my form. I'm create dynamically add text field by using the method "$crud->change_field_type('username', 'text');" but I can't create password field using this code "$crud->change_field_type('password', 'password');"There was create the password field as text field but the input strings are readable. Similarly in the case of hidden field.
Please help me.

Thanks

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 22 December 2011 - 19:30 PM

[quote name='abhilash' timestamp='1324551557' post='153']
Hi,

I would like to add a password input field in my form. I'm create dynamically add text field by using the method "$crud->change_field_type('username', 'text');" but I can't create password field using this code "$crud->change_field_type('password', 'password');"There was create the password field as text field but the input strings are readable. Similarly in the case of hidden field.
Please help me.

Thanks
[/quote]

The hidden field added in version 1.1.2 and the password field is added on version 1.1.4, so ensure that you have 1.1.4 or later . What CI did you use, and what version of grocery CRUD? If you use 1.1.4 or later , can you give an example of your functions ?

abhilash
  • profile picture
  • Member

Posted 23 December 2011 - 04:53 AM

Thanks for your reply.

CI version is 2.0.2 and grocery version is 1.1.4. But didn't solve this issue.
I'm confused with the version updation. Initially I was used 1.1.2 and now I update with 1.1.4. My confusion is which files I should overwrite. I can't start a new project with version 1.1.4 there shows some error, and I merged with older version its going fine. So please give me the right way of updation.

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 23 December 2011 - 06:16 AM

[quote name='abhilash' timestamp='1324616016' post='156']
Thanks for your reply.

CI version is 2.0.2 and grocery version is 1.1.4. But didn't solve this issue.
I'm confused with the version updation. Initially I was used 1.1.2 and now I update with 1.1.4. My confusion is which files I should overwrite. I can't start a new project with version 1.1.4 there shows some error, and I merged with older version its going fine. So please give me the right way of updation.
[/quote]
Why you don't update to 1.1.6? It's ok here is how you can do a normal update in grocery CRUD.
Actually when there is an update you haveto copy ALL the files to your project and not just the library. So for an update follow these steps:
1. First of all make sure that you have backup your old project just in case that something goes wrong and you want to return back.
2. Copy ALL the files from grocery CRUD to your project.
3. You can delete the files example_database.sql, change_log.txt , application/views/example.php and application/controllers/examples.php
4. Now open your new project and everything will work fine.
5. If you still have problems or errors, just send your errors to see what the problem is and solve it.

The reason that you have to copy all the files is cause there are several changes in every update not only at the library but also at the model the views, javascripts, css, e.t.c. so in every update just make sure that you have to copy all the files to your new project and replace the older one.