Title: IF and Radio Button Function
Last modified: August 20, 2016

---

# IF and Radio Button Function

 *  [jrhaile](https://wordpress.org/support/users/jrhaile/)
 * (@jrhaile)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/if-and-radio-button-function/)
 * I have a 3 Value Radio Button Element on my form, all values named biweekly, 
   semiweekly, weekly. The form itself is named payrollfreqyency for the ID/value.
 * I have multiple other text fields that appear to work just fine but when I try
   to add an IF statement with an Output element pointing at my radio button as 
   follows, I get errors like #name? #div? etc here is the page to view [http://www.datapronw.com/blog/?page_id=333](http://www.datapronw.com/blog/?page_id=333)
 * Here is my IF statement, hoping you can help here. Excellent software by the 
   way! My office will be donating to you if we can get this working correctly.
 * IF(payrollfrequency=”weekly”, auditminutessaved*employnumber, IF(payrollfrequency
   =”biweekly”, auditminutessaved*employnumber/2, IF(payrollfrequency=”semimonthly”,(
   employnumber*auditminutessaved*24)/52)))
 * James
 * [http://wordpress.org/extend/plugins/jazzy-forms/](http://wordpress.org/extend/plugins/jazzy-forms/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [jrhaile](https://wordpress.org/support/users/jrhaile/)
 * (@jrhaile)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/if-and-radio-button-function/#post-3374031)
 * I tried using checkboxes with letters for results and no results, that code is
   here
 * IF(weeklypayroll=w, employnumber*auditminutessaved, IF(biweeklypayroll=b, employnumber*
   auditminutessaved/2, IF(semimonthlypayroll=s, (employnumber*auditminutessaved*
   24)/52)))
 * and the field I need, Total Minutes Saved Weekly, shows #VALUE! in the field
 * Thanks,
    James
 *  Thread Starter [jrhaile](https://wordpress.org/support/users/jrhaile/)
 * (@jrhaile)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/if-and-radio-button-function/#post-3374241)
 * No help? I’ve tried that IF statement a million different ways :sadno
 *  [jezza33](https://wordpress.org/support/users/jezza33/)
 * (@jezza33)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/if-and-radio-button-function/#post-3374271)
 * I don’t know if this will help anyone who (like me) has been struggling for hours
   to get the IF function in emails to perform based on Radio Button check / uncheck
   button status / values.
 * I have a facility booking page where to select a Morning booking, I have a radio
   button with the ID morningall; the unchecked value of morningall is 0 (zero),
   and the checked value is 15.
 * First off I have had to create a non-visible output element morningallfmt – whose
   value was morningall – because no amount of experimenting allowed me to get anything
   working by coding IF(morningall=15, “This is booked”,”This is not booked”) to
   function.
 * To my annoyance, coding IF(morningallfmt=15, etc etc did not work either.
 * My breakthough (I think, because it works..) was to resort to sticking the IF
   expression within parentheses (…) placed within a double curly {{……}} place holder,
   so that the code is
 * {{(IF(morningallfmt=15, “This is booked”, “This is not booked”))}}
 * – and result! Works fine!
 * You really have to keep a clear head about which () parentheses are ENCLOSING
   the expression, and which are PART of the expresion
 * Hope this helps a few people, and Igor, if you’re watching and have a shorter
   way to get here (like did I miss something obvious in the Functions Reference?)–
   I’ll be very interested!
 *  [scattered810](https://wordpress.org/support/users/scattered810/)
 * (@scattered810)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/if-and-radio-button-function/#post-3374284)
 * James,
    Here is the code I’m using in a similar instance. This code is for determining
   quantity based pricing per unit.
 * IF(q<=749,0.05,IF(q<=9999,0.04,IF(q>=10000,0.03)))
 * I’ve fixed your code how I would put it..
 * IF(payrollfrequency=”weekly”,(auditminutessaved*employnumber),IF(payrollfrequency
   =”biweekly”, ((auditminutessaved*employnumber)/2),IF(payrollfrequency=”semimonthly”,((
   employnumber*auditminutessaved*24)/52))))
 * No spaces after anything, additional parentheses added where I think they are
   needed. I also notice, “EMPLOYNUMBER” may be a misspelling of employee or employer
   number? Im just guessing there…

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘IF and Radio Button Function’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/jazzy-forms_dac291.svg)
 * [Jazzy Forms](https://wordpress.org/plugins/jazzy-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jazzy-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jazzy-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/jazzy-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jazzy-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jazzy-forms/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [scattered810](https://wordpress.org/support/users/scattered810/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/if-and-radio-button-function/#post-3374284)
 * Status: not resolved