[support] force users to enter path alias

William Smith william.darren at gmail.com
Mon Jun 22 13:19:42 UTC 2009


Hi Mohammed -

I think you misunderstand the hook system.  It is designed so that you
*don't* have to hack core files.  You would implement this in your site's
custom module space (if you don't have one, you can create one easily).  You
would then implement the hook as *your_module_name_*form_alter(&$form,
$form_state, $form_id)

This is the way that Drupal is designed to be extended and is not at all a
hack.  You can read more here: http://api.drupal.org/api/group/hooks/6

Best,
William
**
On Mon, Jun 22, 2009 at 9:07 AM, Mohammed at atexplorer.com <
mohammed at atexplorer.com> wrote:

>  hello William,
>
> thanks for the answer. I don't prefer to use this method as I need to hack
> core files. any other thoughts?
>
> thank you.
> Mohammed.
>
>
> On 6/22/2009 3:09 PM, William Smith wrote:
>
> I don't recall if there is a direct way (ie. config option) to make the
> path alias textfield mandatory, but if nothing else you could use
> hook_form_alter (http://api.drupal.org/api/function/hook_form_alter/6) to
> make the field required.
>
> On Mon, Jun 22, 2009 at 7:13 AM, Mohammed at atexplorer.com <
> mohammed at atexplorer.com> wrote:
>
> hello.
>
> is this at all possible? I want users to fill in the path alias field and
> make it obligatory. it sounds simple, but searching drupal.org didn't
> yield anything relevant.
>
> --
> All The Best,
> Mohammed Al-shar'
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
>
> ------------------------------
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
>
>
> --
> All The Best,
> Mohammed Al-shar'
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/support/attachments/20090622/538ccbec/attachment.htm>


More information about the support mailing list