to populate options in select list, you can call a function in the cck / fieldapi UI and that function do all the trick.<br>I believe this can be done without form alter.<br><br><div class="gmail_quote">On Fri, Jun 29, 2012 at 9:59 PM, Juraj Chlebec <span dir="ltr">&lt;<a href="mailto:havran@gmail.com" target="_blank">havran@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div><br></div><div>I now about hook_form_alter() for modification form elements, but i have bad feeling use arrays like:</div>

<div><br></div><div>$form[&#39;profile_main&#39;][&#39;<a>field_year_of_graduation</a>&#39;][LANGUAGE_NONE][0]</div>
<div><br></div><div>I think sometimes can be LANGUAGE_NONE index changed and then my code not work.</div><div><br></div><div>Is there better way for set allowed_values dynamically or i need create my custom field?</div><div>


<br></div><div>Havran</div><span class="HOEnZb"><font color="#888888"><div><div><br></div>-- <br>Juraj Chlebec aka Havran<br><a href="http://www.svoji.sk" target="_blank">http://www.svoji.sk</a><br><br><br>
</div>
</font></span><br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Vaibhav Jain<br>