Difference between revisions of "Auto-fill Fields Left Blank"

From SDU
Jump to: navigation, search
(Step 1. Edit the form)
m
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
__NOTOC__
 
[[Category:Customizations]]
 
[[Category:Customizations]]
 +
{{Global Header}}
 +
{{Global Announcement}}
 +
 +
== Overview ==
 
This article provides instructions on how to automatically set the value of a blank field once it has lost focus. This method allows you to see the value prior to saving the record.
 
This article provides instructions on how to automatically set the value of a blank field once it has lost focus. This method allows you to see the value prior to saving the record.
  
== Step 1. Edit the form ==
+
== Procedures ==
The solution is to add the following code to the end of your [[PDM_MACRO]].  
+
=== Step 1. Edit the form ===
<!--html--><div class='htmltop'>HTML</div><div class='htmlmain'><!--html1-->evt="onBlur="if&#40;this.value == &#39;&#39;&#41; this.value = &#39;Your text&#39;;""<!--html2--></div><!--html3-->
+
The solution is to add the following code to the end of your [[PDM_MACRO]].
 +
<source lang="html4strict">
 +
evt="onBlur="if(this.value == '') this.value = 'Your text';""
 +
</source>
  
The example that follows adds the code to the [[dtlTextbox]] [[PDM_MACRO]]. The code can be added to other [[PDM_MACRO|PDM_MACROS]], but not likely all of them.  
+
The example that follows adds the code to the dtlTextbox [[PDM_MACRO]]. The code can be added to other [[PDM_MACRO|PDM_MACROS]], but not likely all of them.  
<!--html--><div class='htmltop'>HTML</div><div class='htmlmain'><!--html1--><<span style='color:blue'>PDM_MACRO NAME=dtlTextbox hdr</span>="<span style='color:orange'>Header1</span>" attr=your_field evt="<span style='color:orange'>onBlur="if&#40;this.value == &#39;&#39;&#41; this.value = &#39;Your text&#39;;"</span>"><!--html2--></div><!--html3-->
+
<source lang="html4strict">
 +
<PDM_MACRO NAME=dtlTextbox hdr="Header1" attr=your_field evt="onBlur="if(this.value == '') this.value = 'Your text';"">
 +
</source>
  
 
For r11.x releases it is recommended that you edit your pages via the [[Web Screen Painter]]. For older releases you must edit the files directly.
 
For r11.x releases it is recommended that you edit your pages via the [[Web Screen Painter]]. For older releases you must edit the files directly.
<br>
 
  
== Step 2. Clear the web cache ==
+
=== Step 2. Clear the web cache ===
 
The final step is to clear Service Desk's cache. The methods vary depending on release.
 
The final step is to clear Service Desk's cache. The methods vary depending on release.
 
   
 
   
<font color="blue">'''For r11.x releases of Service Desk:'''</font><br>
+
''For r11.x releases'' publish your changes via the [[Web Screen Painter]]. The process of publishing automatically initiates a [[pdm_webcache]].
Publish your changes via the Web Screen Painter. The process of publishing automatically initiates a [[pdm_webcache]].
+
  
<font color="blue">'''For older releases:'''</font><br>
+
''For older releases'' execute [[pdm_webcache]] from a command prompt on the [[Primary Server]]. There is no need to run this command on the [[Secondary Server|Secondary Servers]].
Execute [[pdm_webcache]] from a command prompt on the Primary Server. There is no need to run this command on the Secondary Servers.
+

Latest revision as of 04:05, 27 July 2008

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.

Overview

This article provides instructions on how to automatically set the value of a blank field once it has lost focus. This method allows you to see the value prior to saving the record.

Procedures

Step 1. Edit the form

The solution is to add the following code to the end of your PDM_MACRO. <source lang="html4strict"> evt="onBlur="if(this.value == ) this.value = 'Your text';"" </source>

The example that follows adds the code to the dtlTextbox PDM_MACRO. The code can be added to other PDM_MACROS, but not likely all of them. <source lang="html4strict"> <PDM_MACRO NAME=dtlTextbox hdr="Header1" attr=your_field evt="onBlur="if(this.value == ) this.value = 'Your text';""> </source>

For r11.x releases it is recommended that you edit your pages via the Web Screen Painter. For older releases you must edit the files directly.

Step 2. Clear the web cache

The final step is to clear Service Desk's cache. The methods vary depending on release.

For r11.x releases publish your changes via the Web Screen Painter. The process of publishing automatically initiates a pdm_webcache.

For older releases execute pdm_webcache from a command prompt on the Primary Server. There is no need to run this command on the Secondary Servers.