I would like to fill a dynamicly input in my gravity form but i don't get why this is not working. I have 3 "random" input type, which works, but i would like the 4th to be filled automaticaly with a variable in my PHP page. The 4th is "HTML" type in gravity forms with this code :
<li id='field_1_6' class='gfield gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' >
<label class='gfield_label' for='input_1_6' >Type<span class='gfield_required'>*</span></label>
<div class='ginput_container ginput_container_text'><input value="<?php echo get_field("my_variable"); ?>" disabled="disabled" name='input_6' id='input_1_6' type='text' class='medium' maxlength='30' tabindex='6' aria-required="true" aria-invalid="false" /></div>
</li>
The code where the gravity form is called (in a loop for every Custom Post Type) :
echo '<p/><button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalLong'.$i.'">
Postuler
</button>
<div class="modal fade" id="exampleModalLong'.$i.'" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">Postuler pour '. get_field("type_demploi") .'</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">';
gravity_form('Form', false, false, false, '', true);
echo ' </div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div> </div> ';
Instead of getting an input with my variable content, i'm getting an input with te content '.get_field(
I also tried with but its not working too
Do you have any idea ?
Thanks