read only text box

R

RYF

I have a web enabled form with multiple views and a field called comments. I
have a repeating section with a multi line textbox for users to add comments
bound to the comments field. I want users to be able to see all the
comments and add their own on their view but not be able to edit others
comments. If I add the comments field to a view and make it read only they
can’t add anything, but if it’s not read only they can go back and edit what
was previously written.
 
S

Santhosh (GGK Tech)

Hi,

Add a repeating section and place the comment text box in that repeating
section. Use the following expression in conditional formatting of comment
text box to make it Read only.

count(following-sibling::my:Comment) > 0
 
S

Swathi (GGK Tech)

Hi,
One way is like what santhosh said. Another way is add an attribute field to
the comments field and store the user name who is adding the comments. Put a
conditional formatting for the comments field if that attribute value is not
equal to the username() then make the field read only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top