Add Field Type For Automate Actions?

Ask your questions here.
Post Reply
empmdk
Posts: 171
Joined: 21 Nov 2016, 05:56
Name: Brandon Ramey

Add Field Type For Automate Actions?

Post by empmdk »

Code: Select all

case 'fieldtype_input_vpic': 
I've added the above code to the "/plugins/ext/modules/processes/actions/fields.php" file in the $use_fields_types = ''; section, but it is not showing up as an option for the button. Is there something else I need to add?
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Add Field Type For Automate Actions?

Post by support »

Open plugins\ext\classes\processes\processes.php and find function

Code: Select all

public static function get_actions_fields_choices($entity_id, $exclude_types = [])
    {
        $available_types = array(
            'fieldtype_checkboxes',
and add 'fieldtype_input_vpic' in this function

Also open modules\items\views\processes.php and find

Code: Select all

    });
</script> 
Add before:

Code: Select all

/*
 * start vpic vin decoder
 */
	$('.vpic-vin-decoder').click(function(){
		field_id = $(this).attr('data-field-id');
		vin_number = $('#fields_'+field_id).val()
		$('#field_'+field_id+'_vin_data').html('<div class="fa-ajax-loader fa fa-spinner fa-spin"></div>'); 
		$('#field_'+field_id+'_vin_data').load('<?php echo url_for('dashboard/vpic','action=input_vin_decode') ?>',{field_id:field_id,vin_number:vin_number})		
	})
/* end vpic vin decoder */ 
Now vpic will work on process form. This update will be for 3.1 version.
empmdk
Posts: 171
Joined: 21 Nov 2016, 05:56
Name: Brandon Ramey

Re: Add Field Type For Automate Actions?

Post by empmdk »

Thank you, Sergey. This works perfectly :D
Post Reply