How to change form fields depending on the user

Asked

Viewed 43 times

0

I’m using Flask Admin and Flask Security to log in. I can easily define depending on a user’s role whether or not they can create an object, but I would also like to be able to add or remove fields from the creation/editing form depending on this role, it is possible?

I tried to change the field form_columns for a property but whenever I access the current_user in this or another field of form he’s still None and therefore I can’t perform any control.

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.