How to make a field readonly after it's saved

yodam

New Member
Hi,
A message creator user write a message in a textarea. After he save it it must become readonly forever.

How to do this field writable/salvageable only once?

Thanks!
 
Last edited:
Using Element access levels.

Define a Joomla view access level of None (with no Joomla groups assigned), and assign None to the access level for edit.
 
Thanks!

It works but I think I did a little mess. Now I have a repeatable group with + button and on bottom a Save button. The field became a label (I like it) but I don't have a button to add a fillable element. With + I get a new row with a readonly element with the same text as others (not a void row that I can compile).

My page now it's like:

DETAILS
----------------------
Orders: 10
Color: red

Messages
---------------------
Text | Attachment
------------------------------------------------------
Hello ONE! | mypicture.jpg | +
Hello ONE! | mypicture.jpg | +
Hello ONE! | mypicture.jpg | + <-------------- NOOOOO the more I press + , the more I get the same row

__________
|___Save___|



Thanks
 
You never said that it was a repeat group element.

For this access levels will not work - you can probably do it with javascript actions instead, though I cannot tell you exactly how.
 
With JavaScript is not so secure. I could accept to press a button "New" on top or bottom and write the message in a new page or in a modal.

Is it possible to do that?

It's like:

=================Page 1===============
DETAILS
----------------------
Orders: 10
Color: red

Messages
---------------------
Text | Attachment
------------------------------------------------------
Hello ONE! | mypicture.jpg |
__________
|___New___|

===============Page 2=================
MESSAGE
----------------------
Text: |__Hi,_______________|
........ |__How are you? _______ |
........ |__See you soon________|

Attachment: |choose...| mycar.jpg

__________
|___Save___|


After saving on page 2 I will return to page 1

Thanks!!
 
Last edited:
Javascript is not as secure - because it is client-side, anyone with sufficient technical knowledge can do anything. For security, you need to limit access from server side - view access levels do that, client-side javascript doesn't.

If it were me I would do Page 1 as a filtered list of messages. And page 2 as a message form. But I am not an expert Fabrik expert.
 
Page 1 it's a details-messages join (on top detail elements and on bottom the readonly list of messages)
Page 2 it's a single message input form

How I connect page1 to page 2 of message input and after the Save button of message/page2 to the page 1 (details-messages join)?

Sorry for this question but I'm at my first project with Fabrik

Thanks!
 
If Page 1 is a filtered list of messages, then the New button will take you to a new message form and when you click Save it will take you back to the list. Clicking on an existing message will display that message.

The difficulty is in showing the details above the list. You might want to consider doing the details as a Joomla Module based on a Fabrik Form Module.
 
Ok but the filtered list of messages must be filtered with the id of Detail. How to do that? I did a left join from detail to messages but now I see it's not so useful.

Thanks!
 
Great - it saves community volunteers like me spending time if you check the wiki first and try to get it working from that.

Once you have worked out how to do it, if you think the wiki is missing something or can be improved, then please give something back by making improvements.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top