<?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: Make a field required or not, depending on a condition?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/make-a-field-required-or-not-depending-on-a-condition</link>
		<description>Gravity Support Forums Topic: Make a field required or not, depending on a condition?</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 20:24:14 +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/make-a-field-required-or-not-depending-on-a-condition" rel="self" type="application/rss+xml" />

		<item>
			<title>kyle on "Make a field required or not, depending on a condition?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/make-a-field-required-or-not-depending-on-a-condition#post-54177</link>
			<pubDate>Tue, 03 Apr 2012 20:39:00 +0000</pubDate>
			<dc:creator>kyle</dc:creator>
			<guid isPermaLink="false">54177@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Okay, I spent a bit of time on this. It could be prettier, but it worked for my needs.  &#60;/p&#62;
&#60;p&#62;I had a number of radio button fields, and some followup questions were only required if the initial question was a specific value.  So, a sample Initial question would look like this:&#60;/p&#62;
&#60;p&#62;1. Were you happy with the product you received?*&#60;/p&#62;
&#60;p&#62;  - Yes&#60;br /&#62;
  - No&#60;/p&#62;
&#60;p&#62;and a follow up question such as:&#60;/p&#62;
&#60;p&#62;2. If you said &#34;No&#34;, why was that?&#60;/p&#62;
&#60;p&#62;  - Poor quality&#60;br /&#62;
  - Have another I like better&#60;br /&#62;
  - None of your business!&#60;/p&#62;
&#60;p&#62;So, here's how I solved it.  Note, I did not have ajax enabled for these forms, so you'd probably need to do some more to get the fields to be valid using ajax.  First some javascript:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastebin.com/ZfJgrXPx&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/ZfJgrXPx&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;and the PHP:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastebin.com/qhepD4be&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/qhepD4be&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Hopefully that helps someone out.  I've commented both files, but let me know if you need more help.  If anyone wants to improve upon either script, that'd be great.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kyle on "Make a field required or not, depending on a condition?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/make-a-field-required-or-not-depending-on-a-condition#post-54148</link>
			<pubDate>Tue, 03 Apr 2012 16:38:30 +0000</pubDate>
			<dc:creator>kyle</dc:creator>
			<guid isPermaLink="false">54148@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm actually searching for this functionality too.  I know you can conditionally remove/add a field based on an answer - so you could have two identical fields - one that is required, and one that isn't, and show/hide the field depending on the condition.  &#60;/p&#62;
&#60;p&#62;I'm hoping I can find/create a better solution.&#60;/p&#62;
&#60;p&#62;Anyone have a reference to something like this, or a good head start on how to accomplish it using some Javascript and PHP?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>webfly on "Make a field required or not, depending on a condition?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/make-a-field-required-or-not-depending-on-a-condition#post-53766</link>
			<pubDate>Thu, 29 Mar 2012 09:49:23 +0000</pubDate>
			<dc:creator>webfly</dc:creator>
			<guid isPermaLink="false">53766@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I know with &#34;Enable Conditional Logic&#34; I can remove it from the form, but I don't want it removed, I still want it there, just not required.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
