Customer Portal

Get Involved. Join the Conversation.

Topic

    Clinton Messias
    Checkbox fieldAnswered
    Topic posted September 13, 2019 by Clinton MessiasBlue Ribbon: 750+ Points 
    52 Views, 7 Comments
    Title:
    Checkbox field
    Content:

    Hello,

    I need to create a checkbox field in the customer portal and this field will be assigned to contact information. Is there any way I can do this?

    Regards. 

    Best Comment

    Sebastiaan Draaisma

    Make sure you disable the widget that shows you all the custom fields

    <!--   <rn:widget path="input/CustomAllInput" table="incidents" always_show_mask="true"/><br /> -->

    That way you can control each custom field by itself. The custom field you are using will have to be placed inside a div with display style set to none. This will include the custom field but hides it.

    <div id="item" style='display:none'><rn:widget path="input/FormInput" name="Incident.c$browser" table="incidents" hide_on_load="false"/></div>

    Comment

     

    • Sebastiaan Draaisma

      Yes you can.

      Checkboxes are not available as custom fields but you are free to create one in HTML and use javascript to assign this to a custom field.
      Based on your needs:

      For a single check box, you could use a custom field yes/no and set the value through javascript based on the checkbox.
      If multiple checkboxes are required then depending on the quantity you could have multiple yes/no custom fields or assign all values into a custom field text area (as an array) and read the array in the workspace through a browser control.

      As usual, there are multiple/other ways of doing this. This is just one way :-)

      • Clinton Messias

        Hello

        I am trying to do this, I have a custom text type field to receive the value from my checkbox and I wrote this code, but I can't save the value.

        Briefly explaining the code, when I click submit I check if the checkbox is checked and if yes I call the function "setcustomfieldbyname" and try to pass a value by string, but it is not working and says that the setcustomfieldbyname is undefined, can help me?

    • Clinton Messias

      And must it be available for the end user to edit? I kept it unchecked because I don't want the field to appear in the customer portal

       

    • Sebastiaan Draaisma

      Have a look at this topic
      How to find the Browser details

      It has a basic example on how to capture data into an invisible div

      • Clinton Messias

        Sure, understand

        But I got a custom field that now will appear in the customer portal, I created an HTML checkbox and I need to send the value to rightnow when this checkbox will be check, I need to create an invisible field to make it?

        It's not possible just to use javascript or PHP to send it?

        Sorry, because I'm confused about it

    • Sebastiaan Draaisma

      Make sure you disable the widget that shows you all the custom fields

      <!--   <rn:widget path="input/CustomAllInput" table="incidents" always_show_mask="true"/><br /> -->

      That way you can control each custom field by itself. The custom field you are using will have to be placed inside a div with display style set to none. This will include the custom field but hides it.

      <div id="item" style='display:none'><rn:widget path="input/FormInput" name="Incident.c$browser" table="incidents" hide_on_load="false"/></div>