This discussion is archived
8 Replies Latest reply: Nov 15, 2012 11:13 PM by user1175496 RSS

Check in Page customization

user1175496 Newbie
Currently Being Moderated
Hi I want to add multi select check boxes for one of the metadata field on the check in page,
can some one tell me the steps to do it.
  • 1. Re: Check in Page customization
    VikrantKorde 1 Explorer
    Currently Being Moderated
    Hi,

    You may not be able to have multi select check boxes. But you can have multiselect list for the field.
    When you add metadata, click on "Enable option list" then click on "Configure", on the popu page, select option list type as Multi select List.

    Regards,
    Vikrant Korde.
  • 2. Re: Check in Page customization
    user1175496 Newbie
    Currently Being Moderated
    Thanks for the reply!!!
    My bad that i did not mention that i already have a multi select option list ,but want a multi select check box.
    Any pointers on the same..
  • 3. Re: Check in Page customization
    user1175496 Newbie
    Currently Being Moderated
    Hi,
    Answering my own question,
    we need to create a custom component to override the std_nameentry_row as follows to display checkboxes:
    Hi,
    I found the correct include to modify the metdata its"std_nameentry_row",i
    modified it as follows:

    <$if strEquals(fieldName, "xTranslateTo") and not (isInfo or isQuery)$>
    <tr <$strTrimWs(inc("std_nameentry_row_attributes"))$>>
    <td <$if captionFieldWidth$>width="<$captionFieldWidth$>"<$endif$> <$if
    isInfo$>align=right<$endif$>><$strTrimWs(inc(fieldCaptionInclude))$></td>
    <td <$if isFieldInfoOnly$>colspan="100"<$endif$> <$if
    captionEntryWidth$>;width="<$captionEntryWidth$>"<$endif$>><$inc(fieldEntryInclu\
    de)$>
    <INPUT TYPE=CHECKBOX NAME="Language" VALUE="English">English
    <INPUT TYPE=CHECKBOX NAME="Language" VALUE="Italian">Italian
    <INPUT TYPE=CHECKBOX NAME="Language" VALUE="French">French
    <INPUT TYPE=CHECKBOX NAME="Language" VALUE="German" >German</td>
    </tr>
    <$else$>
    <$include super.std_nameentry_row$>
    <$endif$>
  • 4. Re: Check in Page customization
    VikrantKorde 1 Explorer
    Currently Being Moderated
    Thanks for posting the solution back in forum. Most of users do not do this...

    Thanks,
    Vikrant Korde.
  • 5. Re: Check in Page customization
    user1175496 Newbie
    Currently Being Moderated
    I have modified the include and added JS as follows ,but the metadata is not getting assigned the selected values,can any one tell me where am I going wrong:

    <script type="text/javascript">
    function getSelected(Language) {
    var selected = new Array();
    var index = 0; for (var intLoop=0; intLoop < Language.length; intLoop++) {
    if (Language[intLoop].selected) {             index = selected.length;       
    selected[index] = new Object;
    selected[index].value = Language[intLoop].value;
    selected[index].index = intLoop; } }
    return selected;
    }
    function submit(selected)
    {
    var value =selected;
    xTranslateTo = value;
    }
    </script>
    <$if strEquals(fieldName, "xTranslateTo") and not (isInfo or isQuery)$>
    <tr <$strTrimWs(inc("std_nameentry_row_attributes"))$>>
    <td <$if captionFieldWidth$>width="<$captionFieldWidth$>"<$endif$> <$if isInfo$>align=right<$endif$>><$strTrimWs(inc(fieldCaptionInclude))$></td>
    <td <$if isFieldInfoOnly$>colspan="100"<$endif$> <$if captionEntryWidth$>;width="<$captionEntryWidth$>"<$endif$>><$inc(fieldEntryInclude)$>

    <INPUT TYPE=CHECKBOX NAME="Language" VALUE="English">English
    <INPUT TYPE=CHECKBOX NAME="Language" VALUE="Italian">Italian
    <INPUT TYPE=CHECKBOX NAME="Language" VALUE="French">French
    <INPUT TYPE=CHECKBOX NAME="Language" VALUE="German" >German</td>
    </tr>
    <$else$>
    <$include super.std_nameentry_row$>
    <$endif$>

    Edited by: user1175496 on Nov 9, 2012 4:17 AM
  • 6. Re: Check in Page customization
    user10960252 Newbie
    Currently Being Moderated
    Hi ,

    when you load your checkin page, view its source and check if you see your javascript.

    I didn't see how you fire your javascript.

    Edited by: user10960252 on 2012-11-15 1:29
  • 7. Re: Check in Page customization
    user1175496 Newbie
    Currently Being Moderated
     
  • 8. Re: Check in Page customization
    user1175496 Newbie
    Currently Being Moderated
    I'm able to present the checkboxes and assign the value to metadata using the following code:

    <$if strEquals(fieldName, "xLang") and not (isInfo or isQuery)$>
    <script>
    function boxFunc()
    {
    var textval=document.getElementsByName('xLang')[0];
    var langs=document.getElementsByName("ucmlang");
    larray="";
    for(i=0;i<langs.length;i++)
    {
    if(langs.checked)
    {
    larray=larray+langs[i].id+",";
    }
    }
    larray=larray.substring(0,larray.length-1);
    textval.value=larray;

    }
    </script>
    <tr <$strTrimWs(inc("std_nameentry_row_attributes"))$>>
    <td<$if captionFieldWidth$>width="<$captionFieldWidth$>"<$endif$> <$if isInfo$>align=right<$endif$>><$strTrimWs(inc(fieldCaptionInclude))$></td>
    <td <$if isFieldInfoOnly$>colspan="100"<$endif$> <$if captionEntryWidth$>;width="<$captionEntryWidth$>"<$endif$>><$inc(fieldEntryInclude)$></td>
    <td><!– addition –>English<!– end addition –><input type="checkbox" name="ucmlang" id = "English" onclick="boxFunc()">
    <td><!– addition –>French<!– end addition –><input type="checkbox" name="ucmlang" id = "French" onclick="boxFunc()"></td>
    <td><!– addition –>Italian<!– end addition –><input type="checkbox" name="ucmlang" id = "Italian" onclick="boxFunc()"></td>
    <td><!– addition –>German<!– end addition –><input type="checkbox" name="ucmlang" id = "German" onclick="boxFunc()"></td>
    <td><!– addition –>Japanese<!– end addition –><input type="checkbox" name="ucmlang" id = "Japanese" onclick="boxFunc()"></td>
    </tr>
    <$else$>
    <$include super.std_nameentry_row$>
    <$endif$>

    but i'm stuck which include to modify in case of the update metadata form.

    Edited by: user1175496 on Nov 15, 2012 11:13 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points