Customer Portal

Get Involved. Join the Conversation.

Topic

    ilamukky
    label_input on output\fieldDisplay widgetAnswered
    Topic posted November 17, 2015 by ilamukky Gold Medal: 3,500+ Points, last edited November 17, 2015 
    257 Views, 5 Comments
    Title:
    label_input on output\fieldDisplay widget
    Content:

    Hello  :)

    On Chat Page, I have the contact fields FirstName / LastName / EmailAddress :

    <rn:widget path="input/FormInput" name="Contact.Emails.PRIMARY.Address" required="true" label_input="#rn:msg:EMAIL_ADDR_LBL#" />

    If I am a customer not logged in, I display the field labels correctly, based on label_input attribute. For example, for Italian interface, "Indirizzo Email".

    If I am logged in, I think the output/fieldDisplay widget is called, I see this in Standard TextInput view:

    <? if ($this->data['readOnly']): ?>
        <rn:widget path="output/FieldDisplay" left_justify="true"/>

    But in this case, the label_input attribute is the default field label , so I see the label "Address" in the Chat Page.

    This happens also with Reference Implementation.

    There is a way to set this label_input without customizing the widgets?...

    I have this problem now in CP3, in CP2 the labels were displayed correctly.

    Thanks very much

    Version:
    Feb2015 CP3
    Image:

    Best Comment

    Jeremy Watson

    This was identified as a defect recently and was fixed in the 3.3 framework of CP released in August of this year (2015).

    For now, you can work around this by setting both the label and the label_input attributes to the same value, e.g.:

    <rn:widget path="input/FormInput" name="Contact.Emails.PRIMARY.Address" required="true" label_input="#rn:msg:EMAIL_ADDR_LBL#" label="#rn:msg:EMAIL_ADDR_LBL#" />

    I think that will fix things for you.

    Let me know if you're still seeing issues.

    James

    Comment

     

    • Travis Cable

      You must create a custom version of the widget to correct this. I believe it was an oversight that will be corrected in the future.

      I created a custom widget of the same name that overrides the view and logic*, then copied the view with the following change:

      <? if ($this->data['readOnly']): ?>
          <rn:widget path="output/FieldDisplay" left_justify="true" label="#rn:php:$this->data['attrs']['label_input']#"/>
      <? else: ?>

      *Note: Because you must override the view and logic, your custom widget will need to have it's own view.php and logic.js.

       

    • ilamukky

      Thanks very much Travis, I thought this, but I hoped there was a way to avoid the customization... thanks

    • Alberto Campioni

      Hi Ilamukky,

      Changing the conf setting CP_CHAT_URL from "chat/chat_launch" to "No Value",

      the contact fields FirstName / LastName / EmailAddress are not more read only and the field labels show correctly.

      But, I do not know all the implications of this change.

      Regards

      Alberto

       

    • Jeremy Watson

      This was identified as a defect recently and was fixed in the 3.3 framework of CP released in August of this year (2015).

      For now, you can work around this by setting both the label and the label_input attributes to the same value, e.g.:

      <rn:widget path="input/FormInput" name="Contact.Emails.PRIMARY.Address" required="true" label_input="#rn:msg:EMAIL_ADDR_LBL#" label="#rn:msg:EMAIL_ADDR_LBL#" />

      I think that will fix things for you.

      Let me know if you're still seeing issues.

      James

    • ilamukky

      Thanks James!! It works ^^  Thanks to all