1

Is it possible to set a default value for the HTML Form Web Part for SharePoint? I'm using SharePoint Online and I am using the HTML Form web part to filter a list on the same page. What I would like to do is have no results displayed on the page until a users selects an option from the drop down. I've tried:

<option value=" " selected="selected"> </option> 

But that doesn't work.

1
  • Should you provide the full HTML From Web Part source code Commented Aug 5, 2016 at 14:46

1 Answer 1

0

The above syntax is valid , you should make sure that

  • There are not any event or action set the default value for option control.
  • Make sure that you are using the correct syntax for select tag as the following
<select>
<option value="India">India</option>
<option value="USA">USA</option>
<option value="" selected="selected">  </option>
</select>

enter image description here

  • afetr save, the selected value is the default value

enter image description here

You can also check How to Customize the HTML Form Web Part

2
  • selected="selected" is valid Commented Aug 5, 2016 at 14:17
  • Thanks @RobertLindgren I checked it, I will update the answer , and also selected only is working Commented Aug 5, 2016 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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