0

I am currently working on a List and I've only 2 Fields (1 Input Text and 1 Textarea (Multi) there as it's for testing something new.

I'm have a function:

iseuserlistdisplayer.Findelement = function (internalname, fieldType) {
    var tacol = document.getElementsByTagName(fieldType);
    var idStartChars=internalname + "_";
    for (var i = 0; i < tacol.length; i++) {
        var el=tacol[i];
        if(el.id) {
            if (el.id.indexOf(idStartChars)==0) {
                return el.id;
            }
        }
    }
    return null;
}

This function get the id of my field if I provide the internalname and fieldType as parameters.

This is working fine for the NewForm and EditForm... But if I open a record in the Disp Form than I don't have any textarea in my list. The markup changes are following:

NewForm:

<td width="350" class="ms-formbody" valign="top">
    <!-- FieldName="gewählte Benutzer"
         FieldInternalName="BenutzerTxt"
         FieldType="SPFieldNote"
    -->
    <span dir="none">
        <textarea title="gewählte Benutzer" class="ms-long" id="BenutzerTxt_44b9da11-4a9c-45d6-b549-20f65588aa70_$TextField" style="height: 0px; display: none;" rows="10" cols="20"></textarea>
    </span>
</td>

DispForm:

<td width="350" class="ms-formbody" valign="top">
    <!-- FieldName="gewählte Benutzer"
         FieldInternalName="BenutzerTxt"
         FieldType="SPFieldNote"
    -->
    <div dir="">

    </div>
</td>

As you can see the textarea is missing and now I'm not able to get the content of it. Is there a way to keep the textarea in the DispForm? Can I do it in the SharePoint Designer when I edit the DispForm of that List?

Any help is appreciated. Thanks!

0

Hi I believe you have to create a separate function for the DispForm.aspx. This form is rendered differently than the other two (NewForm and EditForm).

Just a question though, where will you use the id of the field or what will you do to it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.