• Hello UltimateMember Team Firstly Thanks For this great plugin and i am using Latest Version. And i want to add custom field type in Form Builder like <input type=”tel” id=”fid” value=”somevalue”/> , but i am not able to find some code sample for creating any custom field for form builder. Also If its possible to also make form multistep then please share some code also for that too..
    Its urgent please share it…….

    Thanks and regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @shamshansudhar,

    I’m afraid we don’t have the code samples that you can use.
    If you need customization, please consider hiring a qualified developer with Ultimate member customization experience.

    Regards.

    Thread Starter shamshansudhar

    (@shamshansudhar)

    Please share some simple code snippet to a custom field at Registration field like its html out output should look like <input type=”tel” id”tele” class=”someclass”/>

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @shamshansudhar,

    Unfortunately, I don’t understand what do you mean by “simple code snippet to a custom field at Registration field ” If you want to add your field type to the add field dialog this would require substantial custom coding and no “simple code snippet” is possible.

    Regards.

    Thread Starter shamshansudhar

    (@shamshansudhar)

    Like below code add fields at account page

    add_action('um_after_account_general', 'show_extra_fields', 100);
    function show_extra_fields() {
    
      global $ultimatemember;
      $id = um_user('ID');
      $output = '';
    
      $names = [ 'mobile_number', 'facebook', 'linkedin', 'position', 'country' ];
    
      $fields = [];
      foreach( $names as $name )
        $fields[ $name ] = $ultimatemember->builtin->get_specific_field( $name );
    
      $fields = apply_filters( 'um_account_secure_fields', $fields, $id );
    
      foreach( $fields as $key => $data )
        $output .= $ultimatemember->fields->edit_field( $key, $data );
    
      echo $output;
    }

    But i want to add fields at registration form..I tried to get some info from hookr.io but it seems to have no documentation there sample function code nothing else…May be its looking meaning full to you

    Thread Starter shamshansudhar

    (@shamshansudhar)

    Here is the Big solution you are talking about?

    
    add_filter( "um_predefined_fields_hook", 'pp_maps_add_field', 10 );
    
    function some_add_field( $fields ) {
    	$fields['something_field'] = array(
    		'title'    => __( 'Some Field Name', 'some_abcd' ),
    		'metakey'  => 'meta_name',
    		'required' => 0,
    		'public'   => 1,
    		'editable' => 1,
    		'type'     => 'text',
    		'icon'     => 'um-faicon-somename'
    
    	);
    
    	return $fields;
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add Custom Field Type For Form Builder’ is closed to new replies.