Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Subform Initial Occurence resets when occurence is zero

jnicholas330
Level 7
Level 7

I have a subform whose initial count is one. I can add more, save and they reappear as expected. However, if the form filler decides to remove all the subforms, when the form is reopened, the subform instance reappears set to the initial count. I want to allow the user to remove all the subform instances if they don't have applicable data, and for the choice to be remembered. How do I do this?

2 Replies
natalies3171885
Level 3
Level 3

So the user is saving their own copy of the form after they've removed all subforms, then reopening their copy and using it as a new form? Or just making edits to what they've already filled out?

I'm not sure if it's possilbe, but my though would be to have an additional button to 'remove all future instances' (or whatever you want to call it), and have a click event scripted to change the initial count of that subform to 0. I'm no good at scripting, so no idea how you'd write that.

_Bruce_Robertson
Level 10
Level 10

Hi,

I've never noticed this behaviour before but then have always had a yes/no choice wrapping around the repeat.  I guess you could have a hidden field with the count and use that to set the instances when initialising the form?

Bruce