Skip to main content
Question

Add text to a text field without replacing the existing data and without the name - date stamping

  • November 1, 2017
  • 0 replies
  • 243 views

How can I add text to a text field without replacing the existing data and without the name - date stamping ? (The data I want to add to text field is from Html page.)
This topic has been closed for replies.

  • Registered
  • November 1, 2017

Do you want to import these changes or enter them one at a time using the form?

If you want to import en masse such a change to a text field without overwriting what is currently there, you may need to use an intermediate formula text field, and, a new text field to import into.

Can you provide your desired approach to making the edits to this text field?


  • Author
  • Registered
  • November 1, 2017

Ok, so I have to use an intermediate Formula Text Field and write a formula to replace the text inside square brackets along with the brackets with a comma. How can I achieve that?

  • Registered
  • November 3, 2017
I'd suggest making the 'additions' as child records.  You already have the html page set up to it'll be a breeze to make those as line items.

"log edits" is really just a crutch for most cases and usually comes up against these types of limits often.

  • Registered
  • November 3, 2017
When you edit a record there is a hidden <input> on the form for every field which records the "old" value of the field. So for a field with fid=6 there is the visible <input> with id=_fid_6 and a hidden <input> with name=_fid_oval_6. So what you can do is modify the Save button click handler to first concatenate the value in hidden <input> with the value in the visible <input> and place this concatenated value into the visible <input> and then do the normal Save routine.

Here  is the code to use with IOL that does the trick:

var originalClickHandler = $("#saveButton").data("events").click[0].handler;
$("#saveButton").unbind("click");
$("#saveButton").on("click", function() {
  $("#_fid_6").val($("[name=_fid_oval_6]").val() + ", " + $("#_fid_6").val());
  originalClickHandler();
});
There is no need to use formulas or a child table. The behavior you want should be implemented directly on the form when the keystrokes are entered and the form is Saved.