Forum

Thread tagged as: Shop

Removing it

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's a tricky one because cart properties aren't mandatory, and we don't know where or when they might or might not be set. If we unset it for every form that didn't set a value, we'd be removing values you wanted to keep.

Hi Drew! I'm on 1.0.8 now and it seems we lost the cart property reset that was working for textarea fields in 1.0.7. Values are not updating when I add/remove/change text captured as cart property prior to checkout.

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's not changed. What error are you getting?

Hmm, okay so for the textarea box--

1) blank on initial submission --> returns false - OK
2) add message --> returns true - OK
3) go back to message form --> textarea is blank --> type in new message --> message is updated - OK
4) go back to message form --> leave blank --> message is NOT updated, old message remains - X

Prior to now, it had been a while since my last test but I'm pretty certain that scenario #4 was removing the message and resetting to FALSE, which is my desired outcome...pretty certain because I commented that it was working in this thread lol.

This issue does resemble your reply re: the checkbook fields (that's why I switched to radio buttons); but I could have sworn it was resetting all blank text field submissions to FALSE.

Drew McLellan said:

That's a tricky one because cart properties aren't mandatory, and we don't know where or when they might or might not be set. If we unset it for every form that didn't set a value, we'd be removing values you wanted to keep.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I thought you had to explicitly set it to nothing to remove it, but I can only hold so much in my head. I'll have to go back and re-read all this.

Ek! don't mean for you to have to do that!

Radio buttons work well because you explicitly set them...

Still, I'm pretty sure at one point re-subimtting an empty text area was registering as empty/null/false. <-- desired