Timestamp field in repeating groups

DeeEmm

Member
G'day.

I have added a repeating group to capture user notes, this simply consists of three fields - date, author and note. What I would like to do is for the date field to capture the date / time when the note is posted - simple timestamp. This field should be non-editable.

Normally this is easily achievable by setting the 'Always return todays date' field.

What I am finding with the repeating group, is that when users edit the record the date for all previous entries is also changed to the current date.

I thought I had the issue solved by setting the edit permissions to a higher user level (I created a superadmin user group), but I found that this also prevented the date from initially being written to when the record was created.

Is it possible to set different creation & edit rights? (I can only see edit & view)

Is it possible to do what I need some other way?

TIA

/DM/
 
Hmmnnn, the plot thickens... :D

Just noticed that even though my author field is set up only be editable by the superuser group it is still being recorded in the database. Which is what I expected.

If I set the date to only be editable by the superuser group, when I add a note, initially the date is populated. However, it is not saved when the form is submitted. This is not consistent with what is happening with the author field.

I've also noticed that the author field has a 'Update on edit' setting. This is exactly what I need for the date field. (Author is using the 'user' datatype)

Any ideas?

/DM/
 
Phah.

Managed to get it to not be editable and record in database but now I am back to the issue where the date in ALL previous repeated groups is being updated. :(

Guess my real issue is preventing all previously entered groups from being edited

Any help / ideas on this would be greatly appreciated.

TIA

/DM
 
Hmmm.

Yes, I see the issue.

Unfortunately it doesn't look like an easy fix. I'll need to talk to Rob, and work out the best approach for this.

This has been an issue for a while. The date element is fiendish to work on, due to the different date formats we have to use, and the timezone handling.

I think I may look at creating a 'read only' element, specifically for timestamps, with just three simple options:

Hidden: yes / no
Timestamp type: Create Date / Modify Date
Display format: [standard PHP date format string]

... but I'll talk to Rob first ...

-- hugh
 
Thanks Hugh, that would be great if possible.

For the moment I've created a workaround by setting the repeating groups to read only and including the related data link at the top of the form, at least this way users can see the other records when editing or viewing the form but still have a way to add additional repeating groups if necessary.

I look forward to your response.

Regards

/DM
 
Been away from developing with Fabrik for a while, was wondering if there was any news on this?
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top