Copying field values to other field on save. (Keeping the previous value in the other field, like a log)

By: Dennis Reherman | Asked: 03/21/2024
ForumsCategory: How-toCopying field values to other field on save. (Keeping the previous value in the other field, like a log)
Dennis Reherman asked 6 months ago
Good morning, I have a question which I cannot find on the forum. (Maybe I'm not searching the correct way you never know). I want to establish the following:
  1. Have two Textarea's where one is editable and the other is not.
  2. When saving a form the value that is typed in the editable textarea will be added (preverably at the top) to the none editable textarea.
  3. The then editable textarea will become blank again so it can be used the next time the form is edited in the same a described at point 2. 
  4. If this works you will get like a log of comments with the form, which also makes it possible to communicate these comments with other systems.
I hope someone can help me out with this. Best regards, Dennis Reherman
1 Answers
Rob LeVineRob LeVine answered 6 months ago
You might want to consider using a repeater for what you're trying to do, that would make it easier to associate each block of text with a timestamp. That being said, you can accomplish what you describe by using frm_after_create_entry. That hook is called when an entry is saved, allowing you to jump in and do all you need to.
Dennis Reherman replied 6 months ago

Allright, thank you I will have a look at that.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right