I have a survey list. I need to hide a particular question by placing javascript in a content editor webpart. Can anybody give me the proper javascript code to hide the question in the survey list?
Hiding Sharepoint Survey List fields
4.1k Views Asked by Srikanth At
2
There are 2 best solutions below
0
Paul Leigh
On
The People Picker is a little trickier to pin down due to the way it is rendered in the browser, try something like this
var searchText = RegExp("FieldName=\"[YOUR PEOPLE PICKER NAME]\"", "gi");
$("td.ms-formbody").each(function() {
if(searchText.test($(this).html()))
{
$(this).find("div[Title='People Picker']").css('display', 'none');
return false;
}
});
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in SHAREPOINT
- Can you programmatically generate a link to open a Word document and navigate to a particular location within it (preferably a comment)?
- How to automatically update a column in Sharepoint when an email item is added
- Execution Stuck at Get-PnPPage if function executed on Button Click
- How do I replace CKEditor text inside a rte-webpart?
- Difficulty Accessing SharePoint Files in Docker Container for R Script Execution
- Access denied when using Get-PnPSubWeb
- Can sharepoint calendars have images and a legend with it?
- SharePoint search field
- .NET open xps file from Sharepoint location using XpsDocument class
- Sharepoint 2016 timer service cannot start after applying windows OS patch KB5035855
- PowerShell script to output what SharePoint Online sites have privacy set to public and private
- Limit decimals from import calculated value in power BI
- Connect Sharepoint with c# via PnPCore
- Share excel file on Sharepoint
- Trouble extracting xml property from ajax response
Related Questions in SHAREPOINT-2007
- getting error in access token process in sharepoint onpremise 2016 api
- remind about shared folder in Sharepoint
- Powershell to get full user list from old Sharepoint 2007 farm
- SharePoint List Validation
- Extracting Sharepoint site information from Sharepoint database
- MOSS 2007, programmatically downloading document folder; Can't connect to Document folder
- How to flag any missing documents in a document sets
- How to connect to SharePoint 2007 using C#?
- How to transfer all the data from one site to another in SharePoint?
- How to show external webpage on Sharepoint 2007?
- Powershell to click on 'ok' to delete an SP site
- Unable to access SharePoint repository from java
- Best way to migrate out of box SharePoint 2010 --> SharePoint 2016 site
- How do you remove links from sharepoint site with the XML Schema
- Download file from SharePoint 2013 with authentication
Related Questions in CONTENTEDITABLE
- contentEditable - how to force to write after tag, not inside
- append react custom component to div with contentEditable
- How to get caret position on Twitter editable div?
- Why does contenteditable="false" not work?
- Configure HTML element to behave like text character
- Insert new line in contenteditable on Ctrl+Enter
- How to set Caretposition via mouse click in content editable within a draggable in Firefox
- getSelection().collapseToEnd() does not work
- CkEditor5 - Making div inside UIElement as contenteditable is not working
- Transform text to html based on regex and show it in input or ContentEditable
- React/Next js contentEditable Security with onBlur
- Issue with getBoundingClientRect in contenteditable div when caret is inside an empty child div
- How can I fix this content editable section in a Next app where content is RTL though set to LTR?
- Simulating Keypress in Div Element for Instagram DMs with JavaScript
- How to get content from WebView in jetpack compose
Related Questions in CONTENT-EDITOR
- How to delete an embeded link (content editor) in sharepoint?
- Does Sitecore content editor have native way to display a pop-up box on a page
- Item Tree not being populated from link selector in Sitecore 10.3
- Twilio list-picker shows description after click
- Default ribbon tab in Sitecore content editor changed after adding a button
- How to put/paste the content where cursor is there in content editable div
- Unable to use CSS to remove a button on a toolbar in Sharepoint Web
- WP Content Not Loading in Editor
- Sitecore: target item has no version in this language error
- Hook to item selection action
- Resizing images in contentEditable-div stopped working in Firefox
- Remove component data source in Sitecore
- Add contents to "div element having id or Class" inside TinyMCE editor
- Sitecore 7.2 Content Editor: Long loading time when clicking on an item
- How to add target window as Pop Up for General Link Type in Sitecore?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Though I'd suggest using JQuery and traversing up the dom from the element you want to hide, to hide the thjat the element is contained within. In which case, load the JQuery JS file and use something like: