Forums

CURL doesn't activate FAIL portion despite 401 response

JDMIS 14 Mar, 2023
Hi, could you help me on this issue:

Scenario:CF form submitted 

Submit Action includes
CURL Module calling a URL     
Expected Response:   HTTP 200   (success)     
Success Action includes Email and other modules      

Expected Response: HTTP 401 (access denied - error)     
Failure action includes friendly error message to user

Form Submits,    CURL IS CALLED,   CONFIRM CURL RESPONDS WITH 401 HTTP STATUS  
BUT!!! CUrl Module STILL RUNS SUCCESS branch!   This is obviously undesirable. 

How do I get CURL to branch properly based on the HTTP status?    Or if it cannot, how to I TRIGGER the FAILURE portion of the branch?

Thank you!
Tuan
Max_admin 23 Mar, 2023
Answer
In Chronoforms v7 this is working as you want.

But in v6 it has this issue, and it's not possible to change this behavior as it may affect other users.

You may install v7 on the same website and create this form only in v7

or you may use a switch action:
{var:curl_action_name.http_code} check if this == 200
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
You need to login to be able to post a reply.