I used the power of AI to generate a formula, but this only handles two of the options that I need to split out - I fear that it will get overly complex!
/* Check if hinge drilling is selected */
(hinge_drilling == 0
/* If hinge_drilling is not selected, move to check rustic treatment */
? (rustic_treatment.id == 0
/* If no rustic treatment is selected, output "No hinge drilling or rustic treatment required." */
? text("No hinge drilling or rustic treatment required.")
/* Otherwise, check which rustic treatment is selected */
: (rustic_treatment.id == 1
/* If wire brushing is selected */
? text("No hinge drilling required. This door needs rustic treatment: wire brushing")
: (rustic_treatment.id == 2
/* If circle sawn is selected */
? text("No hinge drilling required. This door needs rustic treatment: circle sawn")
: (rustic_treatment.id == 3
/* If rough sawn is selected */
? text("No hinge drilling required. This door needs rustic treatment: rough sawn")
/* If circle sawn is selected */
: text("No hinge drilling required. This door needs rustic treatment: circle sawn")))))
/* If hinge_drilling is selected, check which side is selected */
: (hinge_drilling == 1
/* If left side is selected, move to check rustic treatment */
? (rustic_treatment.id == 0
/* If no rustic treatment is selected */
? text("This door needs hinge drilled on the left side. No rustic treatment required.")
/* Otherwise, check which rustic treatment is selected */
: (rustic_treatment.id == 1
/* If wire brushing is selected */
? text("This door needs hinge drilled on the left side and rustic treatment: wire brushing")
: (rustic_treatment.id == 2
/* If circle sawn is selected */
? text("This door needs hinge drilled on the left side and rustic treatment: circle sawn")
: (rustic_treatment.id == 3
/* If rough sawn is selected */
? text("This door needs hinge drilled on the left side and rustic treatment: rough sawn")
/* If circle sawn is selected */
: text("This door needs hinge drilled on the left side and rustic treatment: circle sawn"))))
/* If right side is selected for hinge drilling, move to check rustic treatment */
: (hinge_drilling == 2
/* Check rustic treatment */
? (rustic_treatment.id == 0
/* If no rustic treatment is selected */
? text("This door needs hinge drilled on the right side. No rustic treatment required.")
/* Otherwise, check which rustic treatment is selected */
: (rustic_treatment.id == 1
/* If wire brushing is selected */
? text("This door needs hinge drilled on the right side and rustic treatment: wire brushing")
: (rustic_treatment.id == 2
/* If circle sawn is selected */
? text("This door needs hinge drilled on the right side and rustic treatment: circle sawn")
: (rustic_treatment.id == 3
/* If rough sawn is selected */
? text("This door needs hinge drilled on the right side and rustic treatment: rough sawn")
/* If circle sawn is selected */
: text("This door needs hinge drilled on the right side and rustic treatment: circle sawn"))))
/* If a pair is selected for hinge drilling, move to check rustic treatment */
: (rustic_treatment.id == 0
/* If no rustic treatment is selected */
? text("This door needs hinge drilled as a pair. No rustic treatment required.")
/* Otherwise, check which rustic treatment is selected */
: (rustic_treatment.id == 1
/* If wire brushing is selected */
? text("This door needs hinge drilled as a pair and rustic treatment: wire brushing")
: (rustic_treatment.id == 2
/* If circle sawn is selected */
? text("This door needs hinge drilled as a pair and rustic treatment: circle sawn")
: (rustic_treatment.id == 3
/* If rough sawn is selected */
? text("This door needs hinge drilled as a pair and rustic treatment: rough sawn")
/* If circle sawn is selected */
: text("This door needs hinge drilled as a pair and rustic treatment: circle sawn")))))))