• Resolved mjbiggie88

    (@mjbiggie88)


    Hi!

    Thanks so much for creating this plugin. I’ve been trying to create an early pregnancy test calculator for days using code academy and jquery, but I wasn’t making quick progress. Your plugin has helped immensely.

    That being said, I’ve hit a snag.

    I’m not sure how to get the calculate button to run the equation from the calculated fields and populate the solution in the “Your Earliest Test Date” box.

    Any help would be greatly appreciated.

    Thank you!

    • This topic was modified 7 years, 6 months ago by mjbiggie88.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello,

    Actually you have enabled the automatic evaluation of the equations, so, the calculate button is unnecessary, but the equation you have defined is incorrect. Your current equation is:

    cdate(fieldname1+fieldname2)-6

    but:
    – your form does not include any field with name: fieldname2,
    – the operation “cdate” returns a text with date format, and a text minus a number is an invalid operation, so, you should apply the -6 before calling the cdate operation.

    Best regards.

    Thread Starter mjbiggie88

    (@mjbiggie88)

    Thank you!

    I think I have that part figured out now, but the date in the calculated field is showing up dd/mm/yyyy. Is there a way to change it to mm/dd/yyyy?

    Plugin Author codepeople

    (@codepeople)

    Hello,

    Please, pay attention to the plugin documentation, the “CDATE” operation accepts two parameters, the second one defines the date format, for example:

    CDATE(x, 'mm/dd/yyyy')

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use Button to Run Equation in Calc Field’ is closed to new replies.