FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If-statement | Edit Admin Menu Options
#1
Wink 
Hello everyone! I'm so glad to be here. 

My issue is simple: Form Tool’s design only allows admins to create new forms, not clients. The programs native design also only allows for one admin account which also has the power to delete and edit all other users. I need to be that admin. However, the office staff I’m working with needs to be able to create new forms for their use. To solve this issue I have found and implemented a workaround seen here. This has given my other users the power to create new forms but has also given them the power to edit the Form Tools settings. This risks them messing up my setup. I would simply edit the menu settings from within the program, but the critical settings in question (i.e. "settings") is required for all admin accounts. Hence, I cannot take this privilege away from them while still keeping the power to make new forms. I know some PHP and if I could get an if statement working and identify the user id I could ensure that no one but me could access the settings page. However, no function I have yet written has allowed for anything but crashing the page outright for all users.

As I'm still new to Form Tools, I need some help understanding how to query and return the current logged in users account id or username so that I can make use of that information in the code. I also could use some help knowing where to put this code of mine. I will also be very willing to provide any further information asked of me to help clarify the issue and sort out any problems I haven't covered here. 

Any help would be very appreciated. And thank you all in advance, both for the help and for making such a powerful tool free for us to make use of. Smile 
Reply
#2
Hi Zdragon1,

Welcome! And thanks for the post. Smile

This is actually exactly what I'm planning on solving down the road with "user roles". The idea is that we'll no longer have specific hardcoded "admin" / "client" account types, but a much more flexible way to assign arbitrary permissions to user accounts. I think it'll solve your problem exactly. However it's still a ways off yet. I'm still working on wrapping up Form Tools 3 and that'll take another couple of months minimum.

In the meantime I wish I had some advice... but I'm afraid Form Tools just wasn't really designed to be flexible in this regard. Sorry about that...!

Ben
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)