# Action Data

Elementor Pro Advanced

Every action has basic information such as the unique action ID and label. This data is used in the code and displayed to the user in the editor.

# Data Methods

Action data needs to be "returned" by certain methods. Those methods are simple:

class Elementor_Test_Action extends \ElementorPro\Modules\Forms\Classes\Action_Base {

	public function get_name() {
		return 'action_name';
	}

	public function get_label() {
		return esc_html__( 'My Action Name', 'textdomain' );
	}

}
1
2
3
4
5
6
7
8
9
10
11
  • Action Name - The get_name() method returns the action name (id) as it will be used in the code.

  • Action Label - The get_label() method returns the action label as it will be displayed in the editor to the user.