Is there a method to access or update the parent id of an entry from an embed form? I am trying to access and change the parent id on an embed form entry. I have embedded form B into form A, and it is slick. However when I submit the form, it automatically assigns the parent id. However If I use the same form stand alone, I get no parent id, and the field is empty. So here is what I am trying to do. I want to use Form B, embedded into form A, and add an entry , assign a parent id, and so on. But am trying to use a link to update an entry where I want to delete the parent id, but keep the entry, so that way I can go back to it (or them) as old entries, using the user id. that way I have a history of the embed for entries all linked by user id. So I no longer need, or want the parent id when I submit a new embed form entry. However I cannot find a way to update the parent id field directly while leaving the balance of the entry entact. Any thoughts ?? thanks
Can you use frm_after_update_entry? During the process of deleting, you use the built-in update process and, in the hook, you clear the parent id and do whatever else you need.
Thanks for the suggestion. I can't seem to get that to work for me though. I am just trying to get a quick update of the Entries parent_Id.
I tried to write a function to do just that, and it works, but an unfortunate side effect is that it also sets the form_id to 0 and I lose the entire entry. I had to go into the database and manually put the form_id back and now the entry is back.
Not sure why this would happen, perhaps I forgot something in the code. anyway thanks for the assistance.
Please login or Register to submit your answer