Avatar

Level 3

complete change of tac here:

I've replaced all the code and instead have used the action builder. Unfortunately for messages there are no options to put in if statements. Here's the code:

form1.plan.plansub.plantable.planrow.Remove::click - (JavaScript, both)

xfa.host.messageBox("You are about to remove an entry in the plan. Do you wish to proceed?", "Removing Entry!", 2, 2);

this.resolveNode('plantable._planrow').removeInstance(this.parent.index);

if (xfa.host.version < :smiling_face_with_sunglasses: {

  xfa.form.recalculate(1);

}

At the moment even if the message box answer is No it still removes the row in its entirety (which I only want to happen if the answer is 'Yes') I'm assuming that this is down to me not having an if statement. Problem is I don't know what I should do at this point. Can someone help?