<div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace">Thank you Eric for replying,</div><div class="gmail_default" style="font-family:courier new,monospace"><br></div><div class="gmail_default" style="font-family:courier new,monospace">Like I said, this started happening after I renamed the field. Could this be why?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 4 February 2015 at 10:52, Erik Stielstra <span dir="ltr"><<a href="mailto:info@erikstielstra.nl" target="_blank">info@erikstielstra.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi mto,<br>
<br>
I can not reproduce your problem. I copied the code in hello.install, renamed the function to hello_install(), enabled the module and the field was visible in the account form and the user page. Try you code again in on a D7 core, out of the box. Is must be some interaction with other code or styling.<br>
<br>
Regards,<br>
Erik Stielstra<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
> On 4 feb. 2015, at 08:35, Muzaffer Tolga Ozses <<a href="mailto:tolga@ozses.net">tolga@ozses.net</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> I've got the below code. After enabling the module, the field is seen disabled in /admin/config/people/accounts/display/full. Furthermore, even if I enable it, it is not on user account page, even though it is visible in dpm() output. This started happening after I changed the field name.<br>
><br>
> <?php<br>
> /**<br>
> * Implements hook_install().<br>
> */<br>
> function tckn_kontrol_install() {<br>
> $field = array(<br>
> 'field_name' => 'field_tckn',<br>
> 'type' => 'text',<br>
> 'settings' => array(<br>
> 'max_length' => 11,<br>
> ),<br>
> );<br>
> $instance = array(<br>
> 'field_name' => 'field_tckn',<br>
> 'entity_type' => 'user',<br>
> 'bundle' => 'user',<br>
> 'required' => TRUE,<br>
> 'label' => t('TCKN'),<br>
> 'description' => t('Enter your TCKN.'),<br>
> 'settings' => array(<br>
> 'user_register_form' => TRUE,<br>
> ),<br>
> 'display' => array(<br>
> 'default' => array(<br>
> 'label' => 'above',<br>
> 'type' => 'text_textfield',<br>
> ),<br>
> ),<br>
> 'widget' => array(<br>
> 'settings' => array(<br>
> 'size' => 12,<br>
> ),<br>
> ),<br>
> );<br>
> field_create_field($field);<br>
> field_create_instance($instance);<br>
> }<br>
> function tckn_kontrol_uninstall() {<br>
> $instance = array(<br>
> 'field_name' => 'field_tckn',<br>
> 'bundle' => 'user',<br>
> );<br>
> field_delete_field($instance['field_name']);<br>
> }<br>
><br>
> Thank you in advance for replying.<br>
><br>
> --<br>
> mto<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">mto</div></div></div></div>
</div>