<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Development%3Alib%2Fformslib.php_setAdvanced</id>
	<title>Development:lib/formslib.php setAdvanced - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Development%3Alib%2Fformslib.php_setAdvanced"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:lib/formslib.php_setAdvanced&amp;action=history"/>
	<updated>2026-05-08T02:42:59Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Development:lib/formslib.php_setAdvanced&amp;diff=12272&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:lib/formslib.php_setAdvanced&amp;diff=12272&amp;oldid=prev"/>
		<updated>2024-10-21T08:59:29Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 08:59, 21 октября 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Олег Давидович</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Development:lib/formslib.php_setAdvanced&amp;diff=12271&amp;oldid=prev</id>
		<title>1&gt;Jamiesensei: /* Make Sure You Name the Header of a Fieldset Within Which You Include Advanced Elements */  - problem with formatting fixed</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:lib/formslib.php_setAdvanced&amp;diff=12271&amp;oldid=prev"/>
		<updated>2007-03-13T05:51:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Make Sure You Name the Header of a Fieldset Within Which You Include Advanced Elements: &lt;/span&gt;  - problem with formatting fixed&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Formslib}}&lt;br /&gt;
==setAdvanced to specify one form element as an advanced option==&lt;br /&gt;
You can use MoodleQuickForm&amp;#039;s method setAdvanced to specify a form element as an advanced option :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&amp;#039;select&amp;#039;, &amp;#039;display&amp;#039;, get_string(&amp;#039;displaymode&amp;#039;, &amp;#039;choice&amp;#039;), $CHOICE_DISPLAY);&lt;br /&gt;
        $mform-&amp;gt;setAdvanced(&amp;#039;display&amp;#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you set any element in a form to be an advanced item then &amp;#039;&amp;#039;&amp;#039;&amp;#039;show / hide advanced&amp;#039; buttons are shown automatically&amp;#039;&amp;#039;&amp;#039; in the form. Show / hide buttons are currently displayed at the top right of all fieldsets containing advanced controls. The show / hide button shows or hides advanced controls using javascript or if no javascript is available then the whole page is submitted and redisplayed with advanced controls hidden or shown.&lt;br /&gt;
&lt;br /&gt;
setAdvanced takes a second boolean parameter which defaults to true. True means set this control as an advanced control. False means it is not advanced.&lt;br /&gt;
&lt;br /&gt;
===Make Sure You Name the Header of a Fieldset Within Which You Include Advanced Elements===&lt;br /&gt;
&lt;br /&gt;
Ie. this is not good :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&amp;#039;header&amp;#039;, &amp;lt;nowiki&amp;gt;&amp;#039;&amp;#039;&amp;lt;/nowiki&amp;gt;, get_string(&amp;#039;miscellaneoussettings&amp;#039;, &amp;#039;form&amp;#039;));&lt;br /&gt;
        $mform-&amp;gt;addElement(&amp;#039;select&amp;#039;, &amp;#039;display&amp;#039;, get_string(&amp;#039;displaymode&amp;#039;, &amp;#039;choice&amp;#039;), $CHOICE_DISPLAY);&lt;br /&gt;
        $mform-&amp;gt;setAdvanced(&amp;#039;display&amp;#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second param of the addElement(&amp;#039;header&amp;#039;, ....) should be a unique name for the header.&lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t then other sections of the form that also have an unnamed header may also get marked as advanced. This will also happen if header elements have identical names.&lt;br /&gt;
&lt;br /&gt;
==setAdvanced to specify all form elements in a fieldset are advanced elements==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&amp;#039;header&amp;#039;, &amp;#039;miscellaneoussettingshdr&amp;#039;, get_string(&amp;#039;miscellaneoussettings&amp;#039;, &amp;#039;form&amp;#039;));&lt;br /&gt;
        $mform-&amp;gt;setAdvanced(&amp;#039;miscellaneoussettingshdr&amp;#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will set the header element miscellaneoussettingshdr and &amp;#039;&amp;#039;&amp;#039;all&amp;#039;&amp;#039;&amp;#039; the elements it contains to advanced.&lt;br /&gt;
&lt;br /&gt;
===What happens when a form is submitted with form elements hidden?===&lt;br /&gt;
&lt;br /&gt;
If form elements are hidden and the form is submitted then no values are submitted by the form elements. But the &amp;#039;default values&amp;#039; of the form elements are automatically passed to the processing functions from data_submitted(). Default values are set by setDefault normally called from within definition() function or by set_data which is called to load database contents into the form.&lt;/div&gt;</summary>
		<author><name>1&gt;Jamiesensei</name></author>
	</entry>
</feed>