How to deactivate a form and utter_sorry when the "skip" button under any question which is asked to get input is clicked?

I am creating a rasa form with 4 inputs. Now I want to include a feature which is while asking for user input (for ex: “What is your name ?”) , I’ll provide a button below with a title “skip” and a payload with intent “/deny” which when clicked should trigger the form to deactivate and should utter the message " Sorry to see you go".

  - text: "Please give the customer name "
      - title: "Skip"
        payload: "/deny"

This button is provided under every question when asking user for a input. I have tried different ways to write stories and rules for it. But it doesn’t work. Help me find a solution.

Below is the rule I used which does not work :

- rule: New license form - values right - interuption
  # Condition that form is active.
  - active_loop: new_lic_form
  - action: new_lic_form
  - active_loop: new_lic_form
  - slot_was_set:
    - requested_slot: true
  - intent: deny
  - active_loop: null
  - action: utter_greet

Should I add any deactivate form action to make this work? If yes please provide the code and rule. Thank you in advance

Instead of using an intent, you might try an abort entity and slot and have the payload say something like “[abort](abort) form”.

You can then use a required_slots method to change the form required slots so that it will complete. You can read more about that in the forms docs here.