<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How do I set default values with JavaScript?</title><link>https://www.aras.com/community/f/development/6580/how-do-i-set-default-values-with-javascript</link><description>Hi Community, 
 I want to set a default value on a text field with JavaScript. The form has already been created and I don&amp;#39;t want to use a ItemType for my project. 
 Can someone help me out? 
 Regards, David</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: How do I set default values with JavaScript?</title><link>https://www.aras.com/community/thread/3944?ContentTypeID=1</link><pubDate>Mon, 18 Nov 2019 08:59:17 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:15eea1d5-fbb0-48d2-aea7-13de99d2a062</guid><dc:creator>Dave259</dc:creator><description>&lt;p&gt;Hi Chris,&lt;/p&gt;
&lt;p&gt;thank you for your helpful answer. I appreciate that.&lt;/p&gt;
&lt;p&gt;Have a nice day!&lt;/p&gt;
&lt;p&gt;Regards, David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I set default values with JavaScript?</title><link>https://www.aras.com/community/thread/3939?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2019 15:59:26 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:e604d232-53ee-48bc-aed6-173d8101593d</guid><dc:creator>Christopher Gillis</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;If you are not using an ItemType with this form, you could set a default value using either an&amp;nbsp;&lt;em&gt;onFormPopulated&amp;nbsp;&lt;/em&gt;or&amp;nbsp;&lt;em&gt;onLoad&lt;/em&gt; event on your form.&amp;nbsp;You would just need to look up the field in question, check to see if there is already a value set, and set your default value if it is not.&lt;/p&gt;
&lt;p&gt;You can take a look at &lt;a href="/b/english/posts/disable-form-fields"&gt;this blog post&lt;/a&gt; to see how to get the input elements for your different fields. Rather than disabling them like the sample code in the blog post, you would just set the&amp;nbsp;&lt;em&gt;value&lt;/em&gt; attribute of your input.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>