Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //on click
- $(document).on('click', '.add', function(){
- //Loop for repeat index
- for (var repeat_index=0; repeat_index < window.formyoula.form_fields["c47a-5772-e40f"].get('repeat_value').length; repeat_index++ ) {
- //Looop for component data
- for ( var i_component = 0; i_component < window.formyoula.form_fields["c47a-5772-e40f"].get('repeat_value')[repeat_index].length; i_component++ ) {
- //Check if type is Salesforce and null value or no value available
- if ( window.formyoula.form_fields["c47a-5772-e40f"].get('repeat_value')[repeat_index][i_component].type == "Salesforce" ) {
- if ( window.formyoula.form_fields["c47a-5772-e40f"].get('repeat_value')[repeat_index][i_component].value ) {
- //Get component_id
- var component_id = window.formyoula.form_fields["c47a-5772-e40f"].get('repeat_value')[repeat_index][7].component_id;
- //Update UI based on component id.
- $("#collapse_c47a-5772-e40f_"+repeat_index+" #component-"+component_id+" .input_content").val('Requested by Grower');
- //Set value in repeat group
- window.formyoula.form_fields["c47a-5772-e40f"].get('repeat_value')[repeat_index][7].value = 'Requested by Grower'
- } else {
- console.log('No Exist')
- //Get component_id
- var component_id = window.formyoula.form_fields["c47a-5772-e40f"].get('repeat_value')[repeat_index][7].component_id;
- //Update UI based on component id.
- $("#collapse_c47a-5772-e40f_"+repeat_index+" #component-"+component_id+" .input_content").val('Forecasted');
- //Set value in repeat group
- window.formyoula.form_fields["c47a-5772-e40f"].get('repeat_value')[repeat_index][7].value = 'Forecasted'
- }
- }
- }
- }
- })
- //on click
- $(document).on('click', '.add', function(){
- //Loop for repeat index
- for (var repeat_index=0; repeat_index < window.formyoula.form_fields["879f-f484-fcb7"].get('repeat_value').length; repeat_index++ ) {
- //Looop for component data
- for ( var i_component = 0; i_component < window.formyoula.form_fields["879f-f484-fcb7"].get('repeat_value')[repeat_index].length; i_component++ ) {
- //Check if type is Salesforce and null value or no value available
- if ( window.formyoula.form_fields["879f-f484-fcb7"].get('repeat_value')[repeat_index][i_component].type == "Salesforce" ) {
- if ( window.formyoula.form_fields["879f-f484-fcb7"].get('repeat_value')[repeat_index][i_component].value ) {
- //Get component_id
- var component_id = window.formyoula.form_fields["879f-f484-fcb7"].get('repeat_value')[repeat_index][8].component_id;
- //Update UI based on component id.
- $("#collapse_879f-f484-fcb7_"+repeat_index+" #component-"+component_id+" .input_content").val('Requested by Grower');
- //Set value in repeat group
- window.formyoula.form_fields["879f-f484-fcb7"].get('repeat_value')[repeat_index][8].value = 'Requested by Grower'
- } else {
- console.log('No Exist')
- //Get component_id
- var component_id = window.formyoula.form_fields["879f-f484-fcb7"].get('repeat_value')[repeat_index][8].component_id;
- //Update UI based on component id.
- $("#collapse_879f-f484-fcb7_"+repeat_index+" #component-"+component_id+" .input_content").val('Forecasted');
- //Set value in repeat group
- window.formyoula.form_fields["879f-f484-fcb7"].get('repeat_value')[repeat_index][8].value = 'Forecasted'
- }
- }
- }
- }
- })
- //on click
- $(document).on('click', '.add', function(){
- //Loop for repeat index
- for (var repeat_index=0; repeat_index < window.formyoula.form_fields["ee5e-5329-fcbb"].get('repeat_value').length; repeat_index++ ) {
- //Looop for component data
- for ( var i_component = 0; i_component < window.formyoula.form_fields["ee5e-5329-fcbb"].get('repeat_value')[repeat_index].length; i_component++ ) {
- //Check if type is Salesforce and null value or no value available
- if ( window.formyoula.form_fields["ee5e-5329-fcbb"].get('repeat_value')[repeat_index][i_component].type == "Salesforce" ) {
- if ( window.formyoula.form_fields["ee5e-5329-fcbb"].get('repeat_value')[repeat_index][i_component].value ) {
- //Get component_id
- var component_id = window.formyoula.form_fields["ee5e-5329-fcbb"].get('repeat_value')[repeat_index][7].component_id;
- //Update UI based on component id.
- $("#collapse_ee5e-5329-fcbb_"+repeat_index+" #component-"+component_id+" .input_content").val('Requested by Grower');
- //Set value in repeat group
- window.formyoula.form_fields["ee5e-5329-fcbb"].get('repeat_value')[repeat_index][7].value = 'Requested by Grower'
- } else {
- console.log('No Exist')
- //Get component_id
- var component_id = window.formyoula.form_fields["ee5e-5329-fcbb"].get('repeat_value')[repeat_index][7].component_id;
- //Update UI based on component id.
- $("#collapse_ee5e-5329-fcbb_"+repeat_index+" #component-"+component_id+" .input_content").val('Forecasted');
- //Set value in repeat group
- window.formyoula.form_fields["ee5e-5329-fcbb"].get('repeat_value')[repeat_index][7].value = 'Forecasted'
- }
- }
- }
- }
- })
- //on click
- $(document).on('click', '.add', function(){
- //Loop for repeat index
- for (var repeat_index=0; repeat_index < window.formyoula.form_fields["e92d-cd8a-aabe"].get('repeat_value').length; repeat_index++ ) {
- //Looop for component data
- for ( var i_component = 0; i_component < window.formyoula.form_fields["e92d-cd8a-aabe"].get('repeat_value')[repeat_index].length; i_component++ ) {
- //Check if type is Salesforce and null value or no value available
- if ( window.formyoula.form_fields["e92d-cd8a-aabe"].get('repeat_value')[repeat_index][i_component].type == "Salesforce" ) {
- if ( window.formyoula.form_fields["e92d-cd8a-aabe"].get('repeat_value')[repeat_index][i_component].value ) {
- //Get component_id
- var component_id = window.formyoula.form_fields["e92d-cd8a-aabe"].get('repeat_value')[repeat_index][9].component_id;
- //Update UI based on component id.
- $("#collapse_e92d-cd8a-aabe_"+repeat_index+" #component-"+component_id+" .input_content").val('Requested by Grower');
- //Set value in repeat group
- window.formyoula.form_fields["e92d-cd8a-aabe"].get('repeat_value')[repeat_index][9].value = 'Requested by Grower'
- } else {
- console.log('No Exist')
- //Get component_id
- var component_id = window.formyoula.form_fields["e92d-cd8a-aabe"].get('repeat_value')[repeat_index][9].component_id;
- //Update UI based on component id.
- $("#collapse_e92d-cd8a-aabe_"+repeat_index+" #component-"+component_id+" .input_content").val('Forecasted');
- //Set value in repeat group
- window.formyoula.form_fields["e92d-cd8a-aabe"].get('repeat_value')[repeat_index][9].value = 'Forecasted'
- }
- }
- }
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement