Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6935539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:06:58+00:00 2026-05-27T12:06:58+00:00

I have a script I wrote to toggle some SharePoint formfields. I’ve gotten them

  • 0

I have a script I wrote to toggle some SharePoint formfields. I’ve gotten them to hide when the page loads, but I am unable to get them to show because I don’t know how to pin down what the ids of the formfield controls are going to be.

I had thought about adding an id to the Request Type row, but I doubt that would do any good as it’s the control itself, and not the tr that it occupies that changes. Any suggestions?

Actually, if I could figure out a way to get the fieldname attribute of the SharePoint:FormField, that would be my preferred method.

<script type="text/javascript">
$(document).ready(function(){

  $("tr.anon").hide();
  $("tr.reqDet").hide();

  $("#ff5{$Pos}").change(function(){
     $(".anon").toggle();
  });

  $("#ff3{$Pos}").change(function(){
     $("#ff4{$Pos}").toggle();

  });
});
</script>

<tr>
    <td width="190px" valign="top" class="ms-formlabel">
        <H3 class="ms-standardheader">
            <nobr>Request Type<span class="ms-formvalidation"> *</span></nobr>
        </H3>
    </td>
    <td width="400px" valign="top" class="ms-formbody">
        <SharePoint:FormField runat="server" id="ff3{$Pos}" ControlMode="New" FieldName="requestType" __designer:bind="{ddwrt:DataBind('i',concat('ff3',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@requestType')}"/>
        <SharePoint:FieldDescription runat="server" id="ff3description{$Pos}" FieldName="requestType" ControlMode="New"/>
    </td>
</tr>
<tr class="reqDet">
    <td width="190px" valign="top" class="ms-formlabel">
        <H3 class="ms-standardheader">
            <nobr>Request Details</nobr>
        </H3>
    </td>
    <td width="400px" valign="top" class="ms-formbody">
        <SharePoint:FormField runat="server" id="ff4{$Pos}" ControlMode="New" FieldName="requestDetails" __designer:bind="{ddwrt:DataBind('i',concat('ff4',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@requestDetails')}"/>
        <SharePoint:FieldDescription runat="server" id="ff4description{$Pos}" FieldName="requestDetails" ControlMode="New"/>
    </td>
</tr>

Many thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:06:59+00:00Added an answer on May 27, 2026 at 12:06 pm

    Those are some funky looking IDs, are you sure they are valid? If they are then you will need to use this method to access the FormField control (or any Server side control) from javascript/jQuery:

    var myFormField = $("#<%= #ff5{$Pos}.ClientID %>");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have wrote a script to produce an array of data but now want
I have wrote a script to do some backup. There is a if block
I have a bash script which I wrote that lists out some servers/user names.
hi i have the following page: [here][link removed] the script i wrote is working
I have a script that i wrote, but it prints the first part of
I have a script I wrote I while back for comments, but it is
I have wrote universal script to get all rows from Doctrine Table Models, but
I have a Perl script I wrote for my own personal use that fetches
I have an interesting problem. I wrote the following perl script to recursively loop
I have a radcombobox with checkboxes turned on. I wrote a jQuery script to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.