Civi 5.16/Sandbox/WP - if no entry is made to select a number at a price level for pricesets using text/numeric entry, the form allows for $0 registration. If the text/numeric entry counts participants, the user doesn't 'count', a price should be selected. I think the problem is that in CRM/Event/Form/Registration getParticipantCount is checking for !$count which could be '0', and not empty, ~line 994, should that be isset() or empty();same for line1000 $totalCount

  • 1
    Can you restate the problem with a more use-case type description? It sounds like you're trying to create a priceset that allows free participation? Or what is your goal and how are you trying to solve it? – Alan Dixon Dec 4 '19 at 19:16
  • Yes - it seems like there are 2 ways of counting participants;one is to set the participant_count in a price (to 1), the other is to leave that field null, and then count the number either as the logged-in user (1) or additional named participants. In the getParticipantCount function, the count is taken from the current price-set, so if the user has picked NONE of the choices in the set, the count will be zero, which should be flagged as an error ( think). If the code is left as is, the $count being zero is treated the same as if it was empty/not set, and then $count is set to 1, s/b zero. – Lesley Evensen Dec 6 '19 at 22:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.