Form validation based on program membership?

Ilana_Guilfoyle
Level 2

Form validation based on program membership?

Here is my desired experience:

User fills out web form that adds them to a program > success confirmation message

User fills out same form again > form doesn't submit, gets different message.

Does anyone have any thoughts on how this is possible? I know I could use a hidden field that pre-populates, but this form is embedded, and if cookies are cleared then the prefill wouldn't work anyways.

Thanks for any help!

3 REPLIES 3
Josh_Hill13
Level 10 - Champion Alumni

Re: Form validation based on program membership?

Is this form on the same exact page?

If so, you can turn on the Form's "Known Lead" option which will display some other HTML and let the person through.

If you want to get them a different message;

  1. Campaign 1 only lets people go through 1 time.
  2. Campaign 2 listens for the form fill out AND Member of Program=T and Status=X OR Member of Campaign 1=TRUE>Send Email 2
Ilana_Guilfoyle
Level 2

Re: Form validation based on program membership?

The issue with using the known lead option is that just because they may be known, they might not necessarily be part of this specific campaign. I also don't want to rely on cookies for this type of validation.

Your suggestion for "campaign 2" is a good idea, but what I really want to do is prohibit users from submitting the form after they belong to the campaign.

Thanks for your suggestions though!

ilana

SanfordWhiteman
Level 10 - Community Moderator

Re: Form validation based on program membership?

Ilana, relying on cookies -- or local storage, same idea -- to some degree is mandatory.

If the user is not re-identifying her/himself before the form is rendered, there is no way that the server will know who is asking for the form to be rendered.  Hence, there is no way to conditionally display a field unless the user is pre-identified.