# How can i fill the slot in Form action with any random text response

**URL:** <https://forum.rasa.com/t/how-can-i-fill-the-slot-in-form-action-with-any-random-text-response/31278>\
**Category:** Rasa Open Source\
**Created:** [July 12, 2020, 7:46pm UTC](https://forum.rasa.com/t/how-can-i-fill-the-slot-in-form-action-with-any-random-text-response/31278 "2020-07-12T19:46:16Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Panka\_Patidar](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@Panka\_Patidar](https://forum.rasa.com/u/Panka_Patidar)\
**Post date:** [July 12, 2020, 7:46pm UTC](https://forum.rasa.com/t/how-can-i-fill-the-slot-in-form-action-with-any-random-text-response/31278/1 "2020-07-12T19:46:16Z")

</div>

I need to use Actionform and after every utterances i would like to save the response text as a slot value , i have tried the custom slot mapping self.from\_text() but its not working i think , and the error occurs failed to extract slot value , and one more thing is their Got mapping in the cmd on which actions is running with debug , is Got mapping ‘{‘type’: ‘from\_entity’, ‘entity’: ‘name’, ‘intent’: [], ‘not\_intent’: [], ‘role’: None, ‘group’: None}’ , i am not getting why the type is from\_entity , i have written only self.text\_from, help me with this , please guide me with a better solution as i new to rasa . Thank you

---

<div class="post-metadata">

**Author:** ![Juste](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juste/32/15_2.png) [@Juste](https://forum.rasa.com/u/Juste)\
**Post date:** [July 13, 2020, 2:18pm UTC](https://forum.rasa.com/t/how-can-i-fill-the-slot-in-form-action-with-any-random-text-response/31278/2 "2020-07-13T14:18:41Z")

</div>

Hi @Panka_Patidar. Would you be able to share the implementation of your form action here so that I could look into it and potentially spot an issue?

---

<div class="post-metadata">

**Author:** ![Panka\_Patidar](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@Panka\_Patidar](https://forum.rasa.com/u/Panka_Patidar)\
**Post date:** [July 13, 2020, 5:42pm UTC](https://forum.rasa.com/t/how-can-i-fill-the-slot-in-form-action-with-any-random-text-response/31278/3 "2020-07-13T17:42:24Z")

</div>

class Registrationform(FormAction):

```
def name(self):
    return "Register_form"

@staticmethod
def required_slots(Tracker):

    return ["name", "surname"]

def slot_mapping(self):
    return{'name':[self.from_text()],
            "surname":[self.from_text()]
        }
        
def submit(self,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> List[Dict]:
    dispatcher.utter_template("utter_submit",Tracker)
    return []

```

This is my custom action form class , with the slots name and surname Thank You @Juste

---

<div class="post-metadata">

**Author:** ![Panka\_Patidar](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@Panka\_Patidar](https://forum.rasa.com/u/Panka_Patidar)\
**Post date:** [September 5, 2020, 8:48am UTC](https://forum.rasa.com/t/how-can-i-fill-the-slot-in-form-action-with-any-random-text-response/31278/4 "2020-09-05T08:48:23Z")

</div>

@Juste , please do reply , hoping for the solution Thank You

---

<div class="post-metadata">

**Author:** ![kearnsw](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kearnsw/32/4838_2.png) [@kearnsw](https://forum.rasa.com/u/kearnsw)\
**Post date:** [September 5, 2020, 11:56pm UTC](https://forum.rasa.com/t/how-can-i-fill-the-slot-in-form-action-with-any-random-text-response/31278/5 "2020-09-05T23:56:22Z")

</div>

Hi @Panka_Patidar, can you please share the slots section of your domain.yml file?

---

<div class="post-metadata">

**Author:** ![Panka\_Patidar](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@Panka\_Patidar](https://forum.rasa.com/u/Panka_Patidar)\
**Post date:** [September 7, 2020, 5:21am UTC](https://forum.rasa.com/t/how-can-i-fill-the-slot-in-form-action-with-any-random-text-response/31278/6 "2020-09-07T05:21:19Z")

</div>

Hello @kearnsw here is my domain slot section

slots: name: type: text surname: type: text Gender: type: text

Thank You

---

<div class="post-metadata">

**Author:** ![kearnsw](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kearnsw/32/4838_2.png) [@kearnsw](https://forum.rasa.com/u/kearnsw)\
**Post date:** [September 7, 2020, 12:19pm UTC](https://forum.rasa.com/t/how-can-i-fill-the-slot-in-form-action-with-any-random-text-response/31278/7 "2020-09-07T12:19:04Z")

</div>

Try the following for each slot:

```
   type: unfeaturized
   autofill: false
```

---

<div class="post-metadata">

**Author:** ![Panka\_Patidar](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@Panka\_Patidar](https://forum.rasa.com/u/Panka_Patidar)\
**Post date:** [September 18, 2020, 2:23pm UTC](https://forum.rasa.com/t/how-can-i-fill-the-slot-in-form-action-with-any-random-text-response/31278/8 "2020-09-18T14:23:53Z")

</div>

I have tried it , but doesn’t get any result , actually it is extracting on the basis of entity only , not as the text

---

<div class="post-metadata">

**Author:** ![noman](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/noman/32/10071_2.png) [@noman](https://forum.rasa.com/u/noman)\
**Post date:** [September 18, 2020, 10:49pm UTC](https://forum.rasa.com/t/how-can-i-fill-the-slot-in-form-action-with-any-random-text-response/31278/9 "2020-09-18T22:49:21Z")

</div>

are you using mapping policy?

---

<div class="post-metadata">

**Author:** ![Panka\_Patidar](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@Panka\_Patidar](https://forum.rasa.com/u/Panka_Patidar)\
**Post date:** [September 19, 2020, 5:16am UTC](https://forum.rasa.com/t/how-can-i-fill-the-slot-in-form-action-with-any-random-text-response/31278/10 "2020-09-19T05:16:51Z")

</div>

Yes , i am ,but not for this particular

---

<div class="post-metadata">

**Author:** ![noman](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/noman/32/10071_2.png) [@noman](https://forum.rasa.com/u/noman)\
**Post date:** [September 19, 2020, 12:25pm UTC](https://forum.rasa.com/t/how-can-i-fill-the-slot-in-form-action-with-any-random-text-response/31278/11 "2020-09-19T12:25:37Z")

</div>

look into this link it will help [Slot Filling using from\_text](http://forum.rasa.com/t/slot-filling-using-from-text/33659)
