<p>Looks like I read documentation not attentively.  </p>

<p><strong>userContent</strong> supports only static content but not dynamic. </p>

<p>Thus, PHP/JS or something similar can not be used there: <a href="https://wiki.jenkins.io/display/JENKINS/User+Content" rel="nofollow noreferrer">https://wiki.jenkins.io/display/JENKINS/User+Content</a></p>

CC BY-SA 4.0
2018-09-22T12:23:09.430Z
2018-09-22T12:23:09.430Z
user551
<p>I am trying to create a so-called proxy page which will accept user parameters in Jenkins and then pass them to url for running pipeline with specified parameters. </p>

<p>I am trying to achieve it with the help of userContent Jenkins feature: </p>

<pre><code>&lt;font face="verdana" size="2px"&gt;
   &lt;form action="http://user:token@jenkinshost:port/job/dev/job/dev-pipeline/buildWithParameters?n1" method="post"&gt;
       Number1:&lt;input type="text" id="n1" name="n1"&gt;&lt;br&gt;
       &lt;input type="submit" value="Submit"&gt;
  &lt;/form&gt;
&lt;/font&gt;
</code></pre>

<p>But nothing works. </p>

<p>I was even trying to set up the next policy through Jenkins console: </p>

<pre><code>System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox allow-same-origin allow-scripts; default-src 'self'; script-src * 'unsafe-eval'; img-src *; style-src * 'unsafe-inline'; font-src *");
</code></pre>

<p>It also didn't work. </p>

<p>Am I doing something wrong by missing something? </p>

<jenkins>
Pass parameters to jenkins job with the help of userContent
user551
# Pass parameters to jenkins job with the help of userContent

(Asked by: username_0 on 2018-09-21)

I am trying to create a so-called proxy page which will accept user parameters in Jenkins and then pass them to url for running pipeline with specified parameters. 
I am trying to achieve it with the help of userContent Jenkins feature: 

   
       Number1:
       
  


But nothing works. 
I was even trying to set up the next policy through Jenkins console: 
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox allow-same-origin allow-scripts; default-src 'self'; script-src * 'unsafe-eval'; img-src *; style-src * 'unsafe-inline'; font-src *");

It also didn't work. 
Am I doing something wrong by missing something?

**Tags:** jenkins


---

## 1 answers

### Answer by username_0 on 2018-09-22. Score: 1

Looks like I read documentation not attentively.

**userContent** supports only static content but not dynamic.

Thus, PHP/JS or something similar can not be used there: <https://wiki.jenkins.io/display/JENKINS/User+Content>


---

