You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

153 rivejä
7.4 KiB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>form — Form Module &mdash; Documentation</title>
  7. <link rel="stylesheet" href="_static/sphinxdoc.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '',
  12. VERSION: '',
  13. COLLAPSE_MODINDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="_static/jquery.js"></script>
  19. <script type="text/javascript" src="_static/doctools.js"></script>
  20. <link rel="top" title="Documentation" href="index.html" />
  21. <link rel="up" title="Server Side Internals" href="server_side_internals.html" />
  22. <link rel="next" title="page — Page Module" href="page_server.html" />
  23. <link rel="prev" title="page_body — Page Body Serverside Module" href="page_body.html" />
  24. </head>
  25. <body>
  26. <div style="background-color: #FFF; text-align: left; padding: 8px 0px"><img src="_static/banner300910.gif"></div>
  27. <div class="related">
  28. <h3>Navigation</h3>
  29. <ul>
  30. <li class="right" style="margin-right: 10px">
  31. <a href="genindex.html" title="General Index"
  32. accesskey="I">index</a></li>
  33. <li class="right" >
  34. <a href="modindex.html" title="Global Module Index"
  35. accesskey="M">modules</a> |</li>
  36. <li class="right" >
  37. <a href="page_server.html" title="page — Page Module"
  38. accesskey="N">next</a> |</li>
  39. <li class="right" >
  40. <a href="page_body.html" title="page_body — Page Body Serverside Module"
  41. accesskey="P">previous</a> |</li>
  42. <li><a href="index.html">Documentation</a> &raquo;</li>
  43. <li><a href="server_side_api.html" >3. Server Side API</a> &raquo;</li>
  44. <li><a href="server_side_internals.html" accesskey="U">Server Side Internals</a> &raquo;</li>
  45. </ul>
  46. </div>
  47. <div class="sphinxsidebar">
  48. <div class="sphinxsidebarwrapper">
  49. <h4>Previous topic</h4>
  50. <p class="topless"><a href="page_body.html"
  51. title="previous chapter"><tt class="docutils literal docutils literal"><span class="pre">page_body</span></tt> &#8212; Page Body Serverside Module</a></p>
  52. <h4>Next topic</h4>
  53. <p class="topless"><a href="page_server.html"
  54. title="next chapter"><tt class="docutils literal"><span class="pre">page</span></tt> &#8212; Page Module</a></p>
  55. <h3>This Page</h3>
  56. <ul class="this-page-menu">
  57. <li><a href="_sources/form_server.txt"
  58. rel="nofollow">Show Source</a></li>
  59. </ul>
  60. <div id="searchbox" style="display: none">
  61. <h3>Quick search</h3>
  62. <form class="search" action="search.html" method="get">
  63. <input type="text" name="q" size="18" />
  64. <input type="submit" value="Go" />
  65. <input type="hidden" name="check_keywords" value="yes" />
  66. <input type="hidden" name="area" value="default" />
  67. </form>
  68. <p class="searchtip" style="font-size: 90%">
  69. Enter search terms or a module, class or function name.
  70. </p>
  71. </div>
  72. <script type="text/javascript">$('#searchbox').show(0);</script>
  73. </div>
  74. </div>
  75. <div class="document">
  76. <div class="documentwrapper">
  77. <div class="bodywrapper">
  78. <div class="body">
  79. <div class="section" id="module-form">
  80. <h1><tt class="xref docutils literal"><span class="pre">form</span></tt> &#8212; Form Module<a class="headerlink" href="#module-form" title="Permalink to this headline">¶</a></h1>
  81. <dl class="method">
  82. <dt id="form.getdoc">
  83. <tt class="descclassname">form.</tt><tt class="descname">getdoc</tt><big>(</big><big>)</big><a class="headerlink" href="#form.getdoc" title="Permalink to this definition">¶</a></dt>
  84. <dd>Reads <cite>doctype</cite> and <cite>name</cite> from the incoming request (webnotes.form) and adds a <cite>doclist</cite> to the response
  85. (webnotes.response)</dd></dl>
  86. <dl class="method">
  87. <dt id="form.getdoctype">
  88. <tt class="descclassname">form.</tt><tt class="descname">getdoctype</tt><big>(</big><big>)</big><a class="headerlink" href="#form.getdoctype" title="Permalink to this definition">¶</a></dt>
  89. <dd>Reads <cite>doctype</cite> from the incoming request and returns a doclist of the DocType
  90. If <cite>with_parent</cite> is set in webnotes.form then, it returns with the first parent doctype incase of a child
  91. type (used in report builder)</dd></dl>
  92. <dl class="method">
  93. <dt id="form.runserverobj">
  94. <tt class="descclassname">form.</tt><tt class="descname">runserverobj</tt><big>(</big><big>)</big><a class="headerlink" href="#form.runserverobj" title="Permalink to this definition">¶</a></dt>
  95. <dd><p>runserverobj method called by the <cite>$c</cite> (AJAX Call) function on client side</p>
  96. <ul class="simple">
  97. <li>reads the incoming doclist</li>
  98. <li>creates the object using <a title="code.get_server_obj" class="reference external" href="code.html#code.get_server_obj"><tt class="xref docutils literal"><span class="pre">code.get_server_obj()</span></tt></a></li>
  99. <li>executes the <cite>method</cite> using <a title="code.run_server_obj" class="reference external" href="code.html#code.run_server_obj"><tt class="xref docutils literal"><span class="pre">code.run_server_obj()</span></tt></a></li>
  100. </ul>
  101. </dd></dl>
  102. <dl class="method">
  103. <dt id="form.savedocs">
  104. <tt class="descclassname">form.</tt><tt class="descname">savedocs</tt><big>(</big><big>)</big><a class="headerlink" href="#form.savedocs" title="Permalink to this definition">¶</a></dt>
  105. <dd><p>Saves the doc and all child records sent by the form when the &#8220;Save&#8221; button is clicked or <cite>savedocs</cite>
  106. is called from the client side.</p>
  107. <p>Also:
  108. * Checks for integrity - Latest record is being saved
  109. * Validates Links
  110. * Runs <cite>validate</cite>, <cite>on_update</cite>, <cite>on_submit</cite>, <cite>on_cancel</cite></p>
  111. </dd></dl>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. <div class="clearer"></div>
  117. </div>
  118. <div class="related">
  119. <h3>Navigation</h3>
  120. <ul>
  121. <li class="right" style="margin-right: 10px">
  122. <a href="genindex.html" title="General Index"
  123. >index</a></li>
  124. <li class="right" >
  125. <a href="modindex.html" title="Global Module Index"
  126. >modules</a> |</li>
  127. <li class="right" >
  128. <a href="page_server.html" title="page — Page Module"
  129. >next</a> |</li>
  130. <li class="right" >
  131. <a href="page_body.html" title="page_body — Page Body Serverside Module"
  132. >previous</a> |</li>
  133. <li><a href="index.html">Documentation</a> &raquo;</li>
  134. <li><a href="server_side_api.html" >3. Server Side API</a> &raquo;</li>
  135. <li><a href="server_side_internals.html" >Server Side Internals</a> &raquo;</li>
  136. </ul>
  137. </div>
  138. <div class="footer">
  139. &copy; Copyright 2010, Rushabh Mehta.
  140. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3.
  141. </div>
  142. </body>
  143. </html>