Random calculated field value changes on entry update

By: Jane Onorati | Asked: 12/25/2022
ForumsCategory: How-toRandom calculated field value changes on entry update
Jane OnoratiJane Onorati asked 1 year ago
I have a field I use to generate a random gift code.  The problem is that the value changes if I need to update the entry later for any reason.  I need some way of saving the value that was generated when the entry was created so I know what gift code was given out.  I tried assigning this field value as the default value of another field, but they both change on update.
2 Answers
Jane OnoratiJane Onorati answered 1 year ago
Thanks Walter!  That looks like it should work.  I also thought of another way after I posted this question.  Create an API action on entry creation that copies the field value for the entry to another empty field that has no default value set.  I tried it and it does work.

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