First you need to set value in "input" field. after you need to show your dialog box.
you can do it like. Change your code According to this code.
Please Notice "immediate" and "oncomplete" Attribute.
<h:body>
<h:form>
Input : <p:inputText value="#{myBean.input}" immediate="true"/>
<p:commandButton value="Sumbit" oncomplete="dlg.show()" update=":form2"/>
</h:form>
<h:form id="form2">
<p:dialog widgetVar="dlg" modal="true">
passed value:<p:inputText value="#{myBean.input}"/>
</p:dialog>
</h:form>
</h:body>