conditional statement for the inlineedit plugin?

sales2010

Well-Known Member
Hello,

I need to allow Registered users to update a single field ( a dropdown element) named "Status" without entering into the form. Even more, this option should be available only if another field named "Activ" is set to Yes.

For the first part of this request, i've activated the inlineedit plugin for the list and i set the element "Status" to be editable. Into the Access area for this List, the option for "Edit records" is set to Special...

Don't know what to do here...if the user doesn't have the acces to Edit, he can't edit the "Status" in list. If i give him the access, he can enter into the form..

For the second request, unfortunately, i don't have any idea; the value for this field is set by the Editors (this team will review the information submitted by the user..)

Thankyou
 
Thank you, rackem, i tried this plugin, but this will allow user to enter into the form by displaying the edit button and i don't want this...

To make my request more clear, i need to have the following flow:

1. User submit info
2. Editors approve info
3. User see only his own records in a list and should be able to change only a value in a field named Status

You can try it here, use "test" for user and password.
 
yes, no problem here :) The only problem is that i should not allow users to edit previously entered information except the column "Status".
 
The InlineEdit plugin allows you to set what elements are editable. But I think you know that already. So I am confused what you are stuck on when it sounds like to have it figured out. :confused:

Is the issue that you want to hide the edit record button so the user can't access the form? I though there was an option to do this in the list options in Fabrik 2.5 but I can't find it in Fabrik 3.1.
 
Is the issue that you want to hide the edit record button so the user can't access the form?

Yes, not only to hide the edit button but completely restrict this option for all users so they cannot access the form by url :)
 
I think you need to allow the form edit option in the list acl then set the elements you dont want to be editable to be non-editable by the user. Additionally maybe create a custom form template to only show the status element
 
Sorry, but i don't understand :(

If i allow the form edit option in the list acl then the user will see the edit button and can enter to form. At the end, this might be ok as long the user will see all the fields as read-only. This is the reason why i use the details view.

But the fields must be available for user for new records and read-only only when edit. So i think i cannot limit the access to the form view for each element that i don't want to be editable because that will make the element non-editable from beginning..

If you want, try to add a new record here using "test" for user and password. Then here you should see a list of your records. In this list, only the column status might be editable...
 
There are separate ACL settings for edit and add records, can you not use those to state what user group is allowed to add and which user group is allowed to edit?
 
Unfortunately, any registered user should be able to add and after, to edit the status

I've tried to set all elements as read-only when user load the form in order to edit the status, but i can't make it work for dropdown lists..tested with onload, onfocus, onblur..

Code:
var blocheaza = document.form_1.aplicatii_mesaje___categorie_solicitare.value;
if(blocheaza > 0){
$('aplicatii_mesaje___categorie_solicitare').setAttribute('readOnly', 'readOnly');
$('aplicatii_mesaje___categorie_solicitare').addClass('readonly');
}
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top