Jump to content

edit field list changes on certain condition

edit field dynamic

  • Please log in to reply
1 reply to this topic

#1 anchal



  • Members
  • Pip
  • 1 posts

Posted 25 February 2013 - 05:27 AM


I am new to grocery crud. 

The scenario is that I have 2 roles, first TeamLead, second Caller. Now when I go to edit page of any user, i want that if its a team lead, then different fields should be there, and when a caller, then different fields.

The last option is to getstate and write the whole code. I need to know is there any other option?

Thanks in advance.

#2 davidoster


    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 25 February 2013 - 11:17 AM

How do you implement your roles within your application?

I suppose somehow your users login to the system/app, right?

The extension you use(extra library like ion_auth for example) doesn't give you some extra options about 

categorizing your users under different groups?


Let's say something like this would solve your question!

And within your controller function you should use the fields function to limit the fields.

Just be careful to autocomplete fields that have the NOT NULL at your database.



rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---



David Oster aka George Pasparakis,

Also tagged with one or more of these keywords: edit field, dynamic

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users