Body: <p>I am looking for guidance on how to build a form with some IF-THEN logic. I was looking at Profiles but do not see how I can add any logic (correct me if I am wrong) and am wondering of Form Builder is the correct way to go.</p>
  <p>Looking to do the following:</p>
  <p><em>PAGE-1</em>
  Ask user (not logged in user) for their email address.
  Check if the email/contact already exists.</p>
  <p>IF THE CONTACT EXISTS...
  <em>PAGE-2</em>
  Show their email and name and ask them IS THIS YOU? (yes or no).
  Clicking NO returns to page-1 and clicking YES goes to page-final.</p>
  <p>IF CONTACT NOT EXIST...
  <em>PAGE-2</em>
  Ask for Name, Address, Phone.
  Clicking NEXT goes to page-final.</p>
  <p><em>PAGE-FINAL</em>
  Add Activity (called &quot;Check In&quot;) to the contacts account.
  Show message &quot;THANKS FOR CHECKING IN&quot;.</p>
  <p>Some fairly basic logic here, but I think this is simple enough that once I figure this out, I can do much more complex stuff.</p>
  <p>Thanks</p>
  <p>NOTE: To clarify, the above system will be manned by staff member who will review the Name (if contact exists) and ask the user to confirm who they are. This will not be accessible by end users.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-26T20:34:36.540Z
Comments.Text: are there any concerns that you are giving folk a way of seeing who owns any email address that might be in your database? would a more secure way be to have them enter email such that it then triggers an email with a checksum to a Profile so this can be done more securely?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-27T00:16:08.500Z
Comments.Text: I'm with Pete re: the security issue - and while I can think of some janky ways to implement it regardless, I don't think they're a good idea.  Can you say more about your use case?  Finally - note that there is [Caldera CiviCRM](https://civicrm.org/blog/jaapjansma/community-maintained-fork-caldera-forms) and [Profile Conditionals](https://github.com/twomice/com.joineryhq.profcond) - though the latter is really a last resort, I wouldn't use it for something like this.
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-27T00:48:53.140Z
Comments.Text: What you are suggesting is another project I have for users being able to access theor own profile. But what I am asking about in this question (sorry I did not clarify) is actually a form that will have a staff member attending, so they will enter email for the person and then the staff will ask their name to confirm who they are. If they are not in the system, then they will turn laptop around and ask them to enter their information.
Comments.UserDisplayName: jsherk
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-27T14:58:07.903Z
Comments.Text: Is Caldera forms have more features and flexibility than the new Form Builder (Afform?) that has been added to CiviCRM?
Comments.UserDisplayName: jsherk
Tags: <wordpress><contacts>
Title: Building forms with logic on WordPress civicrm
ThreadText: # Building forms with logic on WordPress civicrm
  
  (Asked by: username_0 on 2022-06-25)
  
  I am looking for guidance on how to build a form with some IF-THEN logic. I was looking at Profiles but do not see how I can add any logic (correct me if I am wrong) and am wondering of Form Builder is the correct way to go.
  
  Looking to do the following:
  
  *PAGE-1*
  Ask user (not logged in user) for their email address.
  Check if the email/contact already exists.
  
  IF THE CONTACT EXISTS...
  *PAGE-2*
  Show their email and name and ask them IS THIS YOU? (yes or no).
  Clicking NO returns to page-1 and clicking YES goes to page-final.
  
  IF CONTACT NOT EXIST...
  *PAGE-2*
  Ask for Name, Address, Phone.
  Clicking NEXT goes to page-final.
  
  *PAGE-FINAL*
  Add Activity (called "Check In") to the contacts account.
  Show message "THANKS FOR CHECKING IN".
  
  Some fairly basic logic here, but I think this is simple enough that once I figure this out, I can do much more complex stuff.
  
  Thanks
  
  NOTE: To clarify, the above system will be manned by staff member who will review the Name (if contact exists) and ask the user to confirm who they are. This will not be accessible by end users.
  
  **Tags:** wordpress, contacts
  
  > **Comments:**
  > **username_1**: are there any concerns that you are giving folk a way of seeing who owns any email address that might be in your database? would a more secure way be to have them enter email such that it then triggers an email with a checksum to a Profile so this can be done more securely?  
  > **username_2**: I'm with Pete re: the security issue - and while I can think of some janky ways to implement it regardless, I don't think they're a good idea.  Can you say more about your use case?  Finally - note that there is [Caldera CiviCRM](https://civicrm.org/blog/jaapjansma/community-maintained-fork-caldera-forms) and [Profile Conditionals](https://github.com/twomice/com.joineryhq.profcond) - though the latter is really a last resort, I wouldn't use it for something like this.  
  > **username_0**: What you are suggesting is another project I have for users being able to access theor own profile. But what I am asking about in this question (sorry I did not clarify) is actually a form that will have a staff member attending, so they will enter email for the person and then the staff will ask their name to confirm who they are. If they are not in the system, then they will turn laptop around and ask them to enter their information.  
  > **username_0**: Is Caldera forms have more features and flexibility than the new Form Builder (Afform?) that has been added to CiviCRM?  
  
  ---
  
  ## 0 answers
  
  