<div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace">Hi,</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">I wrote a module, which utilises field_create_field and field_create_instance. I have my $instance array like below:</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace"><div class="gmail_default">$instance = array(</div><div class="gmail_default"> 'field_name' => 'field_tckn',</div><div class="gmail_default"> 'entity_type' => 'user',</div><div class="gmail_default"> 'bundle' => 'user',</div><div class="gmail_default"> 'label' => t('TCKN'),</div><div class="gmail_default"> 'description' => t('Enter your TCKN.'),</div><div class="gmail_default"> 'settings' => array(</div><div class="gmail_default"> 'user_register_form' => TRUE,</div><div class="gmail_default"> ),</div><div class="gmail_default"> 'display' => array(</div><div class="gmail_default"> 'default' => array(</div><div class="gmail_default"> 'label' => 'above',</div><div class="gmail_default"> 'type' => 'text_textfield',</div><div class="gmail_default"> 'settings' => array(</div><div class="gmail_default"> 'size' => 11,</div><div class="gmail_default"> ),</div><div class="gmail_default"> ),</div><div class="gmail_default"> 'full' => array(</div><div class="gmail_default"> 'label' => 'above',</div><div class="gmail_default"> 'type' => 'text_textfield',</div><div class="gmail_default"> 'settings' => array(</div><div class="gmail_default"> 'size' => array(</div><div class="gmail_default"> '#default_value' => 11,</div><div class="gmail_default"> ),</div><div class="gmail_default"> ),</div><div class="gmail_default"> ),</div><div class="gmail_default"> ),</div><div class="gmail_default"> 'widget' => array(</div><div class="gmail_default"> 'settings' => array(</div><div class="gmail_default"> 'size' => 11,</div><div class="gmail_default"> 'description' => t('Enter your TCKN.'),</div><div class="gmail_default"> ),</div><div class="gmail_default"> ),</div><div class="gmail_default"> );</div><div class="gmail_default"><br></div><div class="gmail_default">The field is attaches to user bundle just fine, but what I would like to is re-use the field in any content type. I can do that too, but I would like to override 'Size of textfield' when I add the field. What am I missing in the above code?</div><div class="gmail_default"><br></div><div class="gmail_default">Regards,</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">mto</div></div></div></div>
</div>