<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Automatically calculating age in words as per user input</title>
		<link>https://legacy.forums.gravityhelp.com/topic/automatically-calculating-age-in-words-as-per-user-input</link>
		<description>Gravity Support Forums Topic: Automatically calculating age in words as per user input</description>
		<language>en-US</language>
		<pubDate>Mon, 11 May 2026 00:12:24 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/automatically-calculating-age-in-words-as-per-user-input" rel="self" type="application/rss+xml" />

		<item>
			<title>David Smith on "Automatically calculating age in words as per user input"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automatically-calculating-age-in-words-as-per-user-input#post-19429</link>
			<pubDate>Fri, 25 Feb 2011 16:19:42 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">19429@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Vivek,&#60;/p&#62;
&#60;p&#62;Assuming that the &#34;Date of Birth (in words)&#34; field and the &#34;Age as on 1st April, 2011&#34; should be hidden fields, you can use the &#60;strong&#62;gform_pre_submission&#60;/strong&#62; hook to add the values for this fields after the form has been submitted.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
add_action(&#38;quot;gform_pre_submission&#38;quot;, &#38;quot;pre_submission_handler&#38;quot;);
function pre_submission_handler($form){
    $_POST[&#38;quot;input_4&#38;quot;] = &#38;quot;January 13, 1987&#38;quot;;
    $_POST[&#38;quot;input_71&#38;quot;] = 24;
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This is a very basic example of setting these values. You can use the PHP &#60;strong&#62;date()&#60;/strong&#62; function to convert the numeric birth date to words. Here is an easy way to get the person's age: &#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://stackoverflow.com/questions/3380990/php-calculate-persons-current-age&#34; rel=&#34;nofollow&#34;&#62;http://stackoverflow.com/questions/3380990/php-calculate-persons-current-age&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Vivek Saini on "Automatically calculating age in words as per user input"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automatically-calculating-age-in-words-as-per-user-input#post-19418</link>
			<pubDate>Fri, 25 Feb 2011 14:15:58 +0000</pubDate>
			<dc:creator>Vivek Saini</dc:creator>
			<guid isPermaLink="false">19418@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes Please Guide me May be We Can Close one topic.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Automatically calculating age in words as per user input"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automatically-calculating-age-in-words-as-per-user-input#post-19404</link>
			<pubDate>Fri, 25 Feb 2011 13:03:09 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">19404@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This is similar to your other post.  It requires custom code and using hooks, filters to read form values and populate others using code.&#60;/p&#62;
&#60;p&#62;There isn't a quick and easy guide as what you want to do is pretty specific.  We can provide you with what hooks you would use and a high overview of what you would need to do, but we can't write the custom code for you.&#60;/p&#62;
&#60;p&#62;As with your other question, how skilled are you with PHP and do you know how to use WordPress hooks, actions and filters?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Vivek Saini on "Automatically calculating age in words as per user input"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/automatically-calculating-age-in-words-as-per-user-input#post-19387</link>
			<pubDate>Fri, 25 Feb 2011 06:38:18 +0000</pubDate>
			<dc:creator>Vivek Saini</dc:creator>
			<guid isPermaLink="false">19387@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I have a school registration form in which there is a date picker for selecting date of birth, there are two more fields in the registration form  which should be automatically filled &#60;/p&#62;
&#60;p&#62;Date of Birth (in Words) and&#60;br /&#62;
Age as on 1st April, 2011&#60;br /&#62;
Now these two fields should be automatically filled as per user input on date of birth. &#60;/p&#62;
&#60;p&#62;Could some one please guide me how to do this?&#60;/p&#62;
&#60;p&#62;Form URL = &#60;a href=&#34;http://www.ppischool.com/admissions/online-registration-2/&#34; rel=&#34;nofollow&#34;&#62;http://www.ppischool.com/admissions/online-registration-2/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Thanks &#38;amp; Regards&#60;br /&#62;
Vivek&#60;br /&#62;
Deecoup
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
