Highlight Text that was changed


So I’m currently developing a web app on Bubble where users can submit a form (application) and then it are able to be viewed by an administrator. But the users can edit their application as well after it was submitted and created into the database. How do I make it so that the changes they made are highlighted when an admin goes to see them?

Hopefully this made sense, if not, please let me know!

Add new field in the database table(where the form data is stored from user), once data was edited from user then set boolean value based on this make highlight this on admin logon.

I’m trying to make it highlight the text itself (i.e if a user changes an answer to a question), the admin will be able to see the text itself highlighted so they could easily mark out that it was edited.

@manikandan is right.
I will try to expand on the thinking and offer a similar solution, in detail:

This could be tricky - because you will need to isolate the field in the form, that was edited.
If there are 3 input fields - but a user wants to edit input 2; rather then highlight the entire form (all 3 inputs) you need to isolate input 2 as a separate entity, If you only want to highlight input 2.

I would consider a structure like this:

Save 2 values for the input.
input(#) = inputs value
edit(#) = inputs value.

"input" will be the first value that the user inputs into the field. It will be a fixed value, regardless of how many edits they do.
"edit" can also be saved as the first input that the user enters (which doesn’t make sense right now - but will simplify the highlighting function, as you will see in later steps):

You will have to coordinate a workflow that differentiates between saving the value of “input” and the value of "edit"

When a user changes one of the inputs and perhaps clicks (save edit) button; you can then save the new text as “edit” (corresponding to the same input)

I would also have a data type on the form:
editTime = date (this will be empty initially) you will only add a value if the user edits his/her form

Then! With all that great new data. When an administrator looks at the application you can reconfigure the data to represent the changes by doing:

A conditional statement on the text values:
When current application’s editTime IS NOT empty:
Value(#) = “edit(#)'s value”
Background = yellow (or whatever highlight color you want)

With that data - I would also recommend showing “submitted date” and “edited date” on the top of the form, for context.

Hope that makes sense…

That all being said - the text you want to highlight will need to be the full text element.
You will not be able to highlight a string of text that doesn’t make up the full percentile of the text element.
For that you would need to run an extraction on the text itself. Which causes much more complication. Hopefully you can work around that

You could also have a feature where:

When the administrator puts their mouse cursor over (or clicks) the edited highlighted text - a container could pop up and show the original text.

Which would be…

Thats nice :slight_smile:

This topic was automatically closed after 70 days. New replies are no longer allowed.