Using Element as User Comments

esskay

Member
Thinking of using element as comment system instead of Local Commenting via Form plugin. I have created a group which loads this group after form is submitted. I need to setup user's name and date and time into the comment box. I am trying with user element placeholder but it replaces to all comments. What I need is name of the current logged in user and current date/time who is posting comment. What should be done to get this ?
 
I am still not been able to set this up...I have added a note element to current list and can see the element in form and add the notes. But after saving the form I do not see the notes again...Do I need to create a separate list for the notes element to work ?
 
Yes. You need a table to store the notes.

Create a new list, then add a field to hold the rowid of your main table (called something like 'rowid', make it a field, format as Interger) which will be the "FK" in the note element settings, a textarea for the note (called semething like 'note'), and optionally a user field (can be just a field, or a user element) and a date field.

In the notes element, select that table, select rowid as the FK and as the "where element", leave the "where value" blank, and optionally select the user and date elements.

Note that you can only add notes when editing records, you can't add them when creating a new record. That's because the note has to know the rowid of the record it is related to, and when first creating a new record, there is no rowid. A chicken and egg situation.

-- hugh
 
wow...the only thing I was missing is the extra element for rowid. I was trying it with id element. Now working without issues...
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top