<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Adobe Community: Message List - displaying a message based on age</title>
    <link>https://forums.adobe.com/community/acrobat/forms?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Thu, 22 Aug 2013 18:12:50 GMT</pubDate>
    <generator>Jive Engage 7.0.0.1  (http://jivesoftware.com/products/)</generator>
    <dc:date>2013-08-22T18:12:50Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: displaying a message based on age</title>
      <link>https://forums.adobe.com/message/5617952?tstart=0#5617952</link>
      <description>&lt;!-- [DocumentBodyStart:d041fa26-865d-46c4-8f79-895149abcba9] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;I would use the "Validation" tab to enter a custom Validation script. This script only runs when the field's value changes.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:d041fa26-865d-46c4-8f79-895149abcba9] --&gt;&lt;img src='/beacon?t=1415937050835' /&gt;</description>
      <pubDate>Thu, 22 Aug 2013 18:12:50 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/5617952?tstart=0#5617952</guid>
      <dc:date>2013-08-22T18:12:50Z</dc:date>
      <clearspace:dateToText>1 year 3 months ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: displaying a message based on age</title>
      <link>https://forums.adobe.com/message/5617819?tstart=0#5617819</link>
      <description>&lt;!-- [DocumentBodyStart:b7b4a758-d2d6-4031-a64d-6b664af2620b] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Thanks for the update. New to custom calculation. How do I force it to only run once and on the specific field. Thanks!!&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:b7b4a758-d2d6-4031-a64d-6b664af2620b] --&gt;</description>
      <pubDate>Thu, 22 Aug 2013 17:44:46 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/5617819?tstart=0#5617819</guid>
      <dc:date>2013-08-22T17:44:46Z</dc:date>
      <clearspace:dateToText>1 year 3 months ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: displaying a message based on age</title>
      <link>https://forums.adobe.com/message/5617628?tstart=0#5617628</link>
      <description>&lt;!-- [DocumentBodyStart:3dd5a77b-682d-4e63-9e09-66abc0efbbd9] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;The calculation events are executed when any field is updated just in case a field update changes the result of the calculation in another field.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You need to work out where to put your code or only run it once.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:3dd5a77b-682d-4e63-9e09-66abc0efbbd9] --&gt;</description>
      <pubDate>Thu, 22 Aug 2013 16:57:44 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/5617628?tstart=0#5617628</guid>
      <dc:date>2013-08-22T16:57:44Z</dc:date>
      <clearspace:dateToText>1 year 3 months ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: displaying a message based on age</title>
      <link>https://forums.adobe.com/message/5617514?tstart=0#5617514</link>
      <description>&lt;!-- [DocumentBodyStart:e90fd7b2-f599-4daa-a302-8c1937472c5c] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Have only one field on the entire form that calculates age and based on that age pops a message. This is written as a custom calculation script on Child1DOB. Once the message appears once, it continues to appear when I exit any other field. Check and double checked set-up. Appear to be missing something. &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;var dobValue = getField("Child1DOB").value;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;if (dobValue!="") {&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var dob = util.scand("mm/dd/yyyy", dobValue);&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var today = new Date();&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var age = today.getFullYear() - dob.getFullYear() - 1;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (today.getMonth()&amp;gt;dob.getMonth()) {&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; age++;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if (today.getMonth()==dob.getMonth()) {&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (today.getDate()&amp;gt;dob.getDate())&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; age++;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; event.value = age;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;if (age&amp;gt;18)&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;app.alert("This dependent is over the age of 18. Based on your group's eligiblity rules for dependent children, you may need to provide further information in the Special Dependent Information Section below. This section will allow you to designate Full Time Student or Handicapped status.", 1, 0);&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;event.rc = false;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:e90fd7b2-f599-4daa-a302-8c1937472c5c] --&gt;</description>
      <pubDate>Thu, 22 Aug 2013 16:18:51 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/5617514?tstart=0#5617514</guid>
      <dc:date>2013-08-22T16:18:51Z</dc:date>
      <clearspace:dateToText>1 year 3 months ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: displaying a message based on age</title>
      <link>https://forums.adobe.com/message/5617098?tstart=0#5617098</link>
      <description>&lt;!-- [DocumentBodyStart:c8e41355-c7a8-4925-a6c6-ad22ebb6f716] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Do all the date fields have the same name?&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Where are you placing your scirpt?&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Do you understand the event processing within a PDF form?&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://livedocs.adobe.com/acrobat_sdk/10/Acrobat10_HTMLHelp/JS_API_AcroJS.88.598.html" rel="nofollow"&gt;Form event processing&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:c8e41355-c7a8-4925-a6c6-ad22ebb6f716] --&gt;</description>
      <pubDate>Thu, 22 Aug 2013 14:37:04 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/5617098?tstart=0#5617098</guid>
      <dc:date>2013-08-22T14:37:04Z</dc:date>
      <clearspace:dateToText>1 year 3 months ago</clearspace:dateToText>
      <clearspace:replyCount>4</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: displaying a message based on age</title>
      <link>https://forums.adobe.com/message/5617086?tstart=0#5617086</link>
      <description>&lt;!-- [DocumentBodyStart:050135f3-da9f-4239-adbc-92b6bfb6f202] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Have a small problem. The code works fine as a calculation and pops the correct message. However, the same message pops up when data is entered on other date fields that do not have calculations &amp;#8211; any thoughts&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:050135f3-da9f-4239-adbc-92b6bfb6f202] --&gt;</description>
      <pubDate>Thu, 22 Aug 2013 14:34:55 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/5617086?tstart=0#5617086</guid>
      <dc:date>2013-08-22T14:34:55Z</dc:date>
      <clearspace:dateToText>1 year 3 months ago</clearspace:dateToText>
      <clearspace:replyCount>5</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: displaying a message based on age</title>
      <link>https://forums.adobe.com/message/5615210?tstart=0#5615210</link>
      <description>&lt;!-- [DocumentBodyStart:50e2abad-619c-4cf8-a40e-426aa216f8ec] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Have a look at this thread for calculating a person's age:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-message-small" data-containerId="4698" data-containerType="14" data-objectId="5507632" data-objectType="2" href="https://forums.adobe.com/message/5507632#5507632"&gt;http://forums.adobe.com/message/5507632#5507632&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The script can be modified at the end to include something like:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (age &amp;gt; 18){&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //do something&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //do something else&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;That should get you started.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I hope this helps.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:50e2abad-619c-4cf8-a40e-426aa216f8ec] --&gt;</description>
      <pubDate>Wed, 21 Aug 2013 22:40:02 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/5615210?tstart=0#5615210</guid>
      <dc:date>2013-08-21T22:40:02Z</dc:date>
      <clearspace:dateToText>1 year 3 months ago</clearspace:dateToText>
      <clearspace:replyCount>6</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>displaying a message based on age</title>
      <link>https://forums.adobe.com/message/5614528?tstart=0#5614528</link>
      <description>&lt;!-- [DocumentBodyStart:619b3044-b42a-4d13-87cd-336a472dad23] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;have a pdf built in acrobat Pro xi. Have a field called DOB. Data entry is 8 characters with a validation converting 08221964 to 08/22/1964. Want to calculate the age as of system date. If the age is greater than 18, want to display a message "NOTE: Based on the age, further documentation may be required" Selecting OK on the message will allow the form to proceed without any loss of data. Any suggestions on the correct code to accomplish?&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:619b3044-b42a-4d13-87cd-336a472dad23] --&gt;</description>
      <pubDate>Wed, 21 Aug 2013 19:16:07 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/5614528?tstart=0#5614528</guid>
      <dc:date>2013-08-21T19:16:07Z</dc:date>
      <clearspace:dateToText>1 year 3 months ago</clearspace:dateToText>
      <clearspace:replyCount>7</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

