Messaging: How to hide text fields


3 Kommentare

  • Ahmed Zaid
    User Group Leader Community Moderator
    Zendesk Luminary

    Hi Ernesto,

    I believe the figure in the documentation is showing an extra "Ask for details" step, but the instructions are correct. It's important to not include the itinerary number in any "Ask for details" step.

  • Ernesto Coto

    I have to disagree Ahmed. I have the following code which is very similar to the example.

    <!DOCTYPE html><html lang="en">
       <title>Example itinerary</title>   </head>
       <p>Example itinerary</p>        
       <!-- Start of Zendesk Widget script -->        <script id="ze-snippet" src=""> </script>      <!-- End of Zendesk Widget script -->
          <label for="userfullname">User name:</label>     
          <label id="16927605290129" name="userfullname_value">Jhon Doe</label>
          <label for="useremail">User e-mail:</label>     
          <label id="16927665689361" name="useremail_value"></label>
          <label for="organization">Organization name:</label>
          <label id="16925140136721" name="organization_value">Test org</label>
          <label for="errorm">Error message:</label>
          <label id="16963591641489" name="errorm_value">errorm</label>


    zE('messenger', 'close');
    var uname = document.getElementById('16927605290129');
    console.log('name', uname.getInnerHTML());
    zE('messenger:set', 'conversationFields', [{ id: 16927605290129, value: uname.getInnerHTML()}]);
    var email = document.getElementById('16927665689361');
    console.log('email', email.getInnerHTML());
    zE('messenger:set', 'conversationFields', [{ id: 16927665689361, value: email.getInnerHTML()}]);
    var org = document.getElementById('16925140136721');
    console.log('org', org.getInnerHTML());
    zE('messenger:set', 'conversationFields', [{ id: 16925140136721, value: org.getInnerHTML()}]);
    var eee = document.getElementById('16963591641489');
    console.log('eee', eee.getInnerHTML());
    zE('messenger:set', 'conversationFields', [{ id: 16963591641489, value: eee.getInnerHTML()}]);

    and the following bot. The "Error Message" field is not added to the second "Ask for Details"

    The "Error message" is not shown in the widget window, but it is also not passed to the ticket, see below

    There are no other step types where I could add the Error message field to be passed to the ticket.

    I don't think the example works, or something is missing

  • Ahmed Zaid
    User Group Leader Community Moderator
    Zendesk Luminary

    Hi Ernesto Coto,

    I just tested it in my sandbox. I added no fields in my bot and still populated the custom field with the SDK 's zE('messenger:set', 'conversationFields', []) method. Surprisingly, it passed the data in the case of drop down field, but not for a text field. Can you check if that's the same case for you with drop downs?


Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Powered by Zendesk