<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>