Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am not sure if i understand your question.</p> <p>If i call the php function inputEndDate() it renders this html for me</p> <pre><code>&lt;label for="enddate"&gt;End Date:&lt;/label&gt; &lt;input type="text" readonly name="enddate" id="enddate" value=""&gt; &lt;input type="button" id="enddatebutton" onclick="getEndDate()"&gt; </code></pre> <p>The value of the input-field enddate is empty because on my code <code>$this-&gt;endDate</code> is empty. Where do you get or fill <code>$this-&gt;endDate</code>?</p> <p>If all 3 input-fields are on the same page you need javascript to change the value of expireDate based of the input of endDate - see <a href="http://jsfiddle.net/SWQme/59/" rel="nofollow noreferrer">my updated jsfiddle-example</a>.</p> <h2>Update after review of php code</h2> <p>I took a look into your code - i could not find the spot where you are filling the server-side php var <code>this-&gt;endDate</code>. Based on your other question <a href="https://stackoverflow.com/questions/12798535/javascript-display-expiry-date-upon-user-input-of-start-end-date">how to use change event to add dates in javascript</a> i am unsure where the problem lies. </p> <ul> <li>If you process your php code on the server the value of expireDate must already be filled before you render the html to the client (the browser). See <code>public function setEditBallpark()</code> and the line <code>$this-&gt;endDate = $this-&gt;ballparkDetails-&gt;getBallparkDetailsEndDate();</code></li> <li>If the page is loaded inside the browser of the client you have only html+css+javascript available. To fill the <code>this-&gt;endDate</code> you have to post the value of the client to the server (normal post or ajax). In line 17 is a comment <code># $_POST["enddate"]</code> but the only place that may be getting the post value is this line <code>$this-&gt;endDate = $this-&gt;createBallparkController-&gt;getFormEndDate();</code> on line 75. But the method name <code>function setErrorForm()</code> lets me assume that this method is not relevant for the normal post case.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload