This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

[closed] Admin Only Fields?


  1. workbench
    Member

    I'm just wondering if this is a usable feature...What I mean is, I have added a "Comments" field to a job application form with it set to "admin only"(I would like the ability to review a job application and add my own comments to the form). It does not show up in the job form, only when i go into the "View Entries" area do I see the empty field. This is what I want, however, I cannot seem to edit the "Comments" field at all.

    Is this possible? If not, what is the point of an "Admin Only" Field?

    Posted 16 years ago #
  2. mpivon
    Member

    Admin only is really another term for "Hidden" fields. The <input type="hidden" /> tag sends form fields to the server while hiding them from the reader.

    You would use the hidden field to pass along information for processing the form or for saving "state" in a CGI. *** Remember that hidden fields can be viewed if your readers look at the source HTML, (hard to do in MachForm, but still very possible) so don't use it for sensitive information such as passwords.

    Posted 16 years ago #
  3. yuniar

    Hi all,

    I'm sorry if the "Admin Only" setting has caused confusions to all of you.
    I'll try to explain it a bit more here.

    Basically fields that are set to "Admin Only" will not be shown to users when the form is made public. This is useful for you to add your own private fields, which can only be seen and modified from admin panel.

    If you can't see the "Admin Only" fields from the admin panel, then this is indeed a bug. I'm sorry for this, I missed this somehow.

    To fix it, please follow these steps:

    1) Edit includes/view-functions.php file, search around line 1546

    search for:
    if($element_data->is_private){ //don't show private element

    replace it with:
    if($element_data->is_private && empty($_SESSION['logged_in'])){ //don't show private element

    2) Edit includes/post-functions.php file, search around line 967 (inside process_form_update() function)

    search for:
    form_id='$form_id' and element_is_private=0 order by element_id asc";

    replace it with:
    form_id='$form_id' order by element_id asc";

    That should fix the bug and you should be able to modify "Admin Only" fields from the control panel.

    This fix will be included for the next release. I'm sorry for all inconvenience and thanks for reporting this.


    MachForm Founder

    Posted 16 years ago #
  4. workbench
    Member

    This fixed it on my end..Thanks alot.

    You guys have great customer service!

    Posted 16 years ago #
  5. yuniar

    Sounds great! :-)


    MachForm Founder

    Posted 16 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.