Conditional field using just custom code

we webreg0000 28 Jul, 2016
Dear all,

I'm trying to add conditional field similar to the example "demo-fields-events" in the Custom code tab but without success. When I use Designer everything works fine but if I want to use only Custom code then CF is not processing my code on the same way. I'm sure I'm missing something (with events). Please help.


<div class="form-group gcore-form-row" id="form-row-dropdown5">
  <label for="dropdown5" class="control-label gcore-label-top">Yes / No dropdown</label>
  <div class="gcore-input-wide gcore-display-table" id="fin-dropdown5">
    <select name="dropdown5" id="dropdown5" size="" class="form-control A" title="" style="" data-load-state="" data-tooltip="">
      <option value="No">No</option>
      <option value="Yes">Yes</option>
    </select>
  </div>
</div>

<div class="form-group gcore-form-row" id="form-row-show-hide-element">
  <label for="show-hide-element" class="control-label gcore-label-top">Show / Hide element</label>
  <div class="gcore-input-wide gcore-display-table" id="fin-show-hide-element">
    <input name="show-hide-element" id="show-hide-element" value="" placeholder="" class="form-control A" title="" style="" data-inputmask="" data-load-state="hidden_parent" data-tooltip="" type="text" />
  </div>
</div>


This example works on the simple way: Yes -> Show, No -> Hide. Why I need it without the designer? Because I have one really long form made outside of the designer and I just need to add this functionality to it. Thank you in advance for your help.
Gr GreyHead 28 Jul, 2016
Hi webreg0000,

Have you added the JavaScript to do the show/hide somewhere else?

I think that you may be able to use the Designer > Events sub-tab for this, if not, then you will need to do it with custom JS.

Bob
This topic is locked and no more replies can be posted.