Quantcast
Channel: Topliners: Message List
Viewing all articles
Browse latest Browse all 3460

Re: Mandatory multi-select pick lists for forms

$
0
0

I figured out a way to make multi-select fields required. It will give you the same standard Eloqua error as with the rest of the form fields, it just will not create that little red * next to the field. Also, you'll need the Static Content cloud component and a Cloud Connector login.

 

  1. Place your form on the landing page and save/publish as normal.
  2. View the live page (with the form) in your browser and hoover over the multi-select field options.
  3. Right click and choose “Inspect Element” (works with Chrome and Firefox).
  4. Above the field options should be the id. In the example below its “field2”
  5. Go back into Eloqua and open the landing page editor again.
  6. Select the “Cloud Content” icon from the menu along the right hand side.
  7. Search for the component “Static Content”.
  8. Drag and drop the Static Content component anywhere onto your landing page (can overlap)
  9. Select the component and right click, choose “Edit Content”.
  10. Enter your Cloud Connector login information and click “Log in”
  11. In the Content open text box place the following code, make sure to update the existing field0 values below with the field value you found from step 4 above.

 

<script type="text/javascript">

var field0 = new LiveValidation("field0", {validMessage: "", onlyOnBlur: true});field0.add(Validate.Presence, {failureMessage:"This field is required"});</script>


12. Hit Save Settings

13. Save your landing page and test the functionality.

      The “This field is required” text should appear just as the other Eloqua form field validation does.

 

RequiredMultiSelect.PNG


Viewing all articles
Browse latest Browse all 3460

Trending Articles