Haki Benita
1 min readMay 22, 2018

--

Hey uSexIt,

If you need to make adjustments to the form based on the user permissions or type, you have two choices:

  • Supply context to the form and render accordingly.
  • Have two seperate forms and select the relevent one based on the user permission / type.

I think the second method id better, You can use the more restrictive form as a base class for the second form if you want to keep things DRY.

Hope this helps.

--

--

Haki Benita
Haki Benita

Written by Haki Benita

Full Stack Developer, Team Leader, Independent. More from me at https://hakibenita.com

No responses yet