Viewing 2 reply threads
  • Author
    Posts
    • #7331
      intrepidrealist
      Participant

      Hello!
      I’m relatively new to Piklist and a novice coder taking on an ambitious project. Learning as I go. Yay.

      I’m stumbling on this:

      I have a profile for a child and there is a birthday field on the submission form. The datepicker doesn’t seem to be the right tool for the job so I’m going to use fields for day, month and year.
      Each child will can be signed up to an activity which is age specific, meaning that there is a cut off age. The activity form will have fields for age limit (min and max). I am somehow going to connect the activity post type to the child and I need an alert or error message if the age isn’t appropriate to the age range set in the activity.

      1. If there is a field type “date” in Piklist.
      2. How I should go about triggering the alert or error message. My idea it to conditionally show the alert by pulling the month & year variable from the Activity profile and comparing to month & year variable for the child and having an error message if outside the range. Is this something that’s doable? Or is there a whole bunch of PHP timestamp stuff I need to look into to make things more dynamic.

      Thanks!

    • #7332
      intrepidrealist
      Participant

      Hmmm…
      Maybe Javascript is my solution as well?

    • #7357
      Steve
      Keymaster

      Javascript might work. You can use validation in Piklist. Check out this doc about writing your own validation rules.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.