I'm working on a cloud page where i would like to use an ELSE IF condition instead of two IF conditions. Does any one know a syntax for ELSE IF
Below is my current Ampscript code. These are captured from Form submission via HTTP POST . I don't think that code is necessary here, But if it helps I'm more than happy to add it to the question!
%%[ var @campaignMemberRows, @initialResp, @finalResp set @initialResp = RequestParameter('Attendance') /* Capturing accepted status */ IF @initialResp == "Accept" THEN set @finalResp = "Accepted" ENDIF /* Capturing Declined status */ IF @initialResp == "Decline" THEN set @finalResp = "Declined" ENDIF ]%% What I'm rather wanting to do is something like below!(This code just doesn't set the values and doesn't throw any error either)
%%[ /* Capturing accepted status */ IF @initialResp == "Accept" THEN set @finalResp = "Accepted" /* Capturing Declined status */ ELSE IF @initialResp == "Decline" THEN set @finalResp = "Declined" ENDELSEIF ]%% NOTE: I'm not looking for
IF ELSEcondition as there might be more than a couple of responses I might want to capture so I'm specifically looking forELSE IFcondition.
ENDELSEIFtoENDIF