Disable advanced options in Print widget

908
2
Jump to solution
02-28-2019 05:41 AM
ScottThomas1
New Contributor III

I want to disable select advanced options in the Print widget. I've found that scales aren't accurate when printing so I'm using a local print service with no scale bar or legend. I have been able to get the configuration of advanced options the way I want it in WAB 2.8 dev by commenting out some lines in widgets\Print\templates\Print.html. Now I'm trying to bring the same app into WAB 2.11 but this version has WKID and Feature attribute options which I can't seem to get rid of without breaking the functionality of the Print widget overall. This is what I want the options to look like:

1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Scott,

   Just wrap the elements that you do not want to see in a new div with a style of display none.

...
                </div>
                <div style="display:none;">
                  <div style="font-weight:bold; margin-bottom: 5px">
                      <span>${nls.outputSR}</span>
                      <a href="https://developers.arcgis.com/javascript/jshelp/ref_coordsystems.html" target="blank">WKID</a>
                      <span>:</span>
                  </div>
                  <div style="margin-bottom: 5px">
                      <div>
                          <input type="text" data-dojo-type="dijit/form/ValidationTextBox" data-dojo-attach-event="onChange:_onOutputSRChange"
                              data-dojo-attach-point="wkidInput" data-dojo-props='style:{width:"100%"}'
                              data-dojo-props="required: false"/>
                      </div>
                      <div class="wkid-label jimu-ellipsis" data-dojo-attach-point="wkidLabel">
                      </div>
                  </div>
                </div>
                <div style="font-weight:bold;" data-dojo-attach-point="labelsTitleNode">
                    ${nls.labels}:
                </div>
...

Lines 3 and 18 above were added.

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Scott,

   Just wrap the elements that you do not want to see in a new div with a style of display none.

...
                </div>
                <div style="display:none;">
                  <div style="font-weight:bold; margin-bottom: 5px">
                      <span>${nls.outputSR}</span>
                      <a href="https://developers.arcgis.com/javascript/jshelp/ref_coordsystems.html" target="blank">WKID</a>
                      <span>:</span>
                  </div>
                  <div style="margin-bottom: 5px">
                      <div>
                          <input type="text" data-dojo-type="dijit/form/ValidationTextBox" data-dojo-attach-event="onChange:_onOutputSRChange"
                              data-dojo-attach-point="wkidInput" data-dojo-props='style:{width:"100%"}'
                              data-dojo-props="required: false"/>
                      </div>
                      <div class="wkid-label jimu-ellipsis" data-dojo-attach-point="wkidLabel">
                      </div>
                  </div>
                </div>
                <div style="font-weight:bold;" data-dojo-attach-point="labelsTitleNode">
                    ${nls.labels}:
                </div>
...

Lines 3 and 18 above were added.

ScottThomas1
New Contributor III

Thanks! I don't do a lot of coding, but I will definitely use this here and in the future.