Formidable form copy value of appointment field

By: Massimiliano Mollo | Asked: 02/02/2023
ForumsCategory: General questionsFormidable form copy value of appointment field
Massimiliano Mollo asked 2 years ago
HI In formidable forms. How i can set appointment field value(not ID) to the other field in a same page. Lets assume that i want to copy the id "336" appointment field to another text field in same page so i wrote [336] in the default value section of other field. But here the value is coming from ID of appointment, It's not comig from the current real time . It will be helpful for  me if anybody can tell me how can it be done .  
3 Answers
Walter JonesWalter Jones answered 2 years ago
Use something like this in the after fields of your form settings. 

<script type="text/javascript">
        $(document).ready(function () {
            $("#field_et353").keyup(function () {
                var value = $(this).val();
                $("#field_dfg345").val(value);
            });
        });
</script>
Change the et353 to your first field key and dfg345 to your second. Depending on the type of field your using reference: https://formidableforms.com/knowledgebase/javascript-examples/#kb-referencing-field-types
Massimiliano Mollo answered 2 years ago
Start your code here
****test1
<script type="text/javascript"> $(document).ready(function () { $('select[name="item_meta[336]"]').keyup(function () { var value = $(this).val(); $("#field_ehb8a").val(value); }); }); </script> TEST2 <script type="text/javascript"> $(document).ready(function () { $("#field_gsl0z").keyup(function () { var value = $(this).val(); $("#field_ehb8a").val(value); }); }); </script> ****try also all kind
Text Input (date, number, etc...): #field_key Dropdown: select[name='item_meta[994]'] Multiple Select Dropdown: select[name='item_meta[994][]'] Radio Button: input[name="item_meta[988]"] Checkbox/Toggle: input[name='item_meta[453][]']



The source field are appointment field https://formidableforms.com/knowledgebase/simply-schedule-appointments-forms/#kb-download-and-install
Massimiliano Mollo answered 2 years ago
Start your code here

<label for="field_gsl0z" id="field_gsl0z_label" class="frm_primary_label control-label">BOOKING <span class="frm_required" aria-hidden="true">*</span> </label>

<input type="hidden" id="field_gsl0z" name="item_meta[336]" value="26721" data-reqmsg="Questo campo non può essere vuoto." aria-required="true" data-invmsg="BOOKING RAPALLO non è valido" class="ssa_appointment_form_field_appointment_id form-control ng-pristine ng-untouched ng-valid ng-empty" ng-model="BOOKING" aria-invalid="false" autocomplete="off">

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right