How do I implement conditional fields?

  • FJD07
  • FJD07's Avatar Topic Author
17 Jul 2011 22:59 - 04 Nov 2014 14:04 #1 by FJD07
Is it possible to have a conditional form using your component? For example if I select something from a drop-down menu I would like to have some radio buttons appear or even a text field. Something like that.

Please let me know! And thanks for this awesome extension.!

Please Log in or Create an account to join the conversation.

More
18 Jul 2011 12:52 #2 by Demis [Fox-Labs]
Replied by Demis [Fox-Labs] on topic How do I implement conditional fields?
I'm sorry, currently you can't.
But this is an interesting feature to add.

This post will be moved under "Feature requests" section.

Please Log in or Create an account to join the conversation.

  • Lee
  • Lee's Avatar Topic Author
28 Sep 2011 13:03 - 28 Sep 2011 19:12 #3 by Lee
Replied by Lee on topic How do I implement conditional fields?
Hi

I am looking to implement text box under the drop down if click other they fill in an text box. I got the fields set up and working but can validate the value and include it in the message to an email.

http://www.millerand.co.uk/develop/joomla%20sites/Site3/index.php?option=com_content&view=article&id=116&Itemid=564

Lee

Please Log in or Create an account to join the conversation.

  • lee
  • lee's Avatar Topic Author
28 Sep 2011 13:04 #4 by lee
Replied by lee on topic How do I implement conditional fields?
Meant doesnt validate and post the data.

Please Log in or Create an account to join the conversation.

  • Lee
  • Lee's Avatar Topic Author
28 Sep 2011 14:43 #5 by Lee
Replied by Lee on topic How do I implement conditional fields?
Hi

I am looking to implement text box under the drop down if click other they fill in an text box. I got the fields set up just need to be validate the value and include it in the message to an email.

http://www.millerand.co.uk/develop/joomla%20sites/Site3/index.php?option=com_content&view=article&id=116&Itemid=564

Please Log in or Create an account to join the conversation.

More
28 Sep 2011 19:09 - 28 Sep 2011 19:11 #6 by Demis [Fox-Labs]
Replied by Demis [Fox-Labs] on topic How do I implement conditional fields?
I see.
Probably you need to modify fmailer.php to read values from your custom text fields, because they don't seem to be Fox Contact standard text fields.
No idea for validation.

Maybe a better approach could be to make them standard text fields and identify them with an ID attribute.

Please Log in or Create an account to join the conversation.

  • Lee
  • Lee's Avatar Topic Author
29 Sep 2011 10:15 #7 by Lee
Replied by Lee on topic How do I implement conditional fields?
That was the way i was thinking. But because it done as an array, and using the xml file to submit the data. I cant seem to pass data outside the array in the fieldbuilder dropdown section.

Please Log in or Create an account to join the conversation.

More
30 Sep 2011 12:32 #8 by Demis [Fox-Labs]
Replied by Demis [Fox-Labs] on topic How do I implement conditional fields?
Ok. If you create your "please specify" fields as standard text fields it should work.
In this case your only problem is to identify and hide/show them.
Is it right?

Please Log in or Create an account to join the conversation.

  • Lee
  • Lee's Avatar Topic Author
04 Oct 2011 10:32 #9 by Lee
Replied by Lee on topic How do I implement conditional fields?
Hi

Thanks i finally manage to do it anyway but i will take into consideration on the advice you just told me.

Thanks

Please Log in or Create an account to join the conversation.

More
15 Dec 2011 20:46 - 04 Feb 2012 22:53 #10 by Laleh
Replied by Laleh on topic How do I implement conditional fields?
We need a to create a form field (or section) conditional to a previous selection or answer; e.g. AFTER a user selects "Other" from a dropdown list a field gets displayed asking them to enter the value for the other. How can we make this work, preferably only with FoxContact, or if needed with addion of plugins, etc.

We are on Fox Contact 2.0 update 9 (without the Powered By backlink).

Please Log in or Create an account to join the conversation.