0

Eloqua Forms

I want to know if there is some way to show or hide fields (or sections) depending on what values of others fields.

Of course, I am asking on some OOTB behavior; if not, will do it with JS.

Thanks in advance.

Community
  • 1
  • 1
korbo
  • 1
  • 2

2 Answers2

0

Unfortunately, Eloqua does not have a conditional rules for form field visibility (at least not yet. Dependent Field Visibility/Logic).

Until that functionality is brought into Eloqua Forms, you would have to write some Javascript to accomplish this.

user1234567
  • 51
  • 1
  • 6
  • Thanks guy. And what do you think about this: https://relationshipone.com/blog/progressive-profiling-oracle-eloqua/ – korbo Mar 02 '18 at 20:12
  • @korbo , Been quite some time since I've logged in :'( But that's Progressive Profiling. It doesnt show/hide fields based on field values, It mostly hides the fields/section if there is a value for them. While it is a great feature for forms, based on your question, I don't think that's what you're looking for. You can read more about it in the [Oracle Documentation](https://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAA/#Help/Forms/ProgressiveProfiles.htm%3FTocPath%3DForms%7CProgressive%2520profiles%7C_____0) – user1234567 Mar 25 '18 at 19:08
  • Thanks @user1234567 ! Actually, I had posted other question for Progressive Profiling! Pleas check: https://stackoverflow.com/questions/49182677/eloqua-forms-progresive-profie-profiling For some reason, it's not working. If you can reach me at mateo.recoba@gmail.com, would be very nice! Thanks in advance! – korbo Mar 26 '18 at 19:59
0

You would need a listener (onchange in example).

Eloqua uses dynamic ids for form field elements based upon order. Setting the "HTML Name" value for the fields in the form editor allows for a more stable reference.

var fieldToListenTo = document.getElementsByName('eloquaHTMLName1')[0];
var fieldToChange = document.getElementsByName('eloquaHTMLName2')[0];

fieldToListenTo.onchange = function(){
  if(fieldToListenTo == 1) {
    fieldToChange.value = "New Value 1";
  }
  else {
    fieldToChange.value = "New Value 2";
  }
}