Trouble understanding dependent fields

  • WebTech Chair
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 3 months ago #73840 by WebTech Chair
Trouble understanding dependent fields was created by WebTech Chair
I'm attempting to make it possible for a user to order multiple t-shirts with their event registration. Per posts I found on the forum, I've set up a field for the t-shirt sizes and prices, then created dependent/custom fields for the quantity for each size. Then, in each size field, I put in a custom formula of, for example, ([SM_T_SIZE]-1)*[TSHIRT] and associated the size field with just one of the sizes in the T-shirt field (I'm not sure why the -1 is required, but it seemed to make it calculate the pricing correctly if you select just one size).

My issue, as you can see from the attached screenshot, is that if you select more than 1 size from the checkboxes and then change the value to more than 1, it doesn't calculate the total correctly. The sizes selected in the screenshot are $20 each, but the calculated total is as if I selected 4 shirts total.

I hope I'm describing this well enough for someone to tell me what I'm doing wrong. Tuan, if you want to look at this on the site, I've sent you credentials for dev.uwpiaa.org in that support ticket we were working on earlier.

Thanks!
Attachments:

Please Log in or Create an account to join the conversation.

  • WebTech Chair
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 3 months ago #73861 by WebTech Chair
Replied by WebTech Chair on topic Trouble understanding dependent fields
I seem to have gotten it working using a list type dependent field instead of a text type field. See the attachment for how I configured them. I've created one of these size fields for each size, then made it dependent on the t-shirt field and the matching size. Is this correct?

Attachments:

Please Log in or Create an account to join the conversation.

  • WebTech Chair
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 3 months ago #73870 by WebTech Chair
Replied by WebTech Chair on topic Trouble understanding dependent fields
Ok, I think I got it all working! The issue was that I had entered fee values for each tshirt size in the tshirt field. I removed those, made sure that all of the dependent size fields had their data type validation field set to None, removed the zeros from the fee values fields for each size, and then everything started working as expected.

The documetation on this could be lots better... hopefully this is helpful to anyone else who tries this at home...

Cheers!

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc