API page: http://api.drupal.org/api/drupal/modules%21system%21system.api.php/funct...

Just wondering if we could link to the form API reference from the hook_form_alter page.

http://api.drupal.org/api/drupal/developer%21topics%21forms_api_referenc...

Maybe in See Also or Related Topics. Seems like the right thing to do. =)

Many thanks!
-Tim

Files: 
CommentFileSizeAuthor
#11 form_api_link_d8-1728472-11.patch889 bytesplopesc
PASSED: [[SimpleTest]]: [MySQL] 40,570 pass(es). View
#4 form_api_link_d8-1728472-4.patch993 bytesplopesc
PASSED: [[SimpleTest]]: [MySQL] 40,556 pass(es). View
#4 form_api_link_d7-1728472-4.patch973 bytesplopesc
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch form_api_link_d7-1728472-4_0.patch. Unable to apply patch. See the log in the details link for more information. View

Comments

jhodgdon’s picture

Title: Link to form API Reference » Link to form API Reference from hook_form_alter().
Version: 7.x-dev » 8.x-dev
Issue tags: +Novice, +needs backport to D7

Good idea! Thanks.

plopesc’s picture

Hello

I think related links would be the proper place for this link. However, I don't know how to include it in that section. I reviewed http://drupal.org/node/1354 but I'm not sure where place the link.

Regards

jhodgdon’s picture

You can use an @see to make the link, and that goes at the bottom of the documentation block.

plopesc’s picture

FileSize
973 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch form_api_link_d7-1728472-4_0.patch. Unable to apply patch. See the log in the details link for more information. View
993 bytes
PASSED: [[SimpleTest]]: [MySQL] 40,556 pass(es). View

My question was about how to include the links in the Related links section, AFAIK @see lines are included in the See Also section.

Included @see for hook_form_alter and hook_form_FORM_ID_alter.

Attaching patchs form d7 and d8.

Regards.

plopesc’s picture

Assigned: Unassigned » plopesc
Status: Active » Needs review
Issue tags: -Novice, -needs backport to D7

Updating status

Status: Needs review » Needs work

The last submitted patch, form_api_link_d7-1728472-4.patch, failed testing.

jhodgdon’s picture

What do you mean "Related Links" -- you mean "Related Topics"? That is just for @ingroup, so you cannot use it to make a link to the Form API reference.

Also, please do not attach 7.x patches to 8.x issues -- see
http://drupal.org/node/1319154#multiple-versions

jhodgdon’s picture

Issue tags: +Novice, +needs backport to D7

putting back the tags

plopesc’s picture

Sorry.
Thanks for your comments.
I'll reroll the patch for D7 after you change the issue version.
Regards

jhodgdon’s picture

The @see can/should just point to forms_api_reference.html. You should not put in the entire URL. Thanks!

plopesc’s picture

Status: Needs work » Needs review
FileSize
889 bytes
PASSED: [[SimpleTest]]: [MySQL] 40,570 pass(es). View

Patch re-rolled pointing to forms_api_reference.html.

Regards

jhodgdon’s picture

Status: Needs review » Fixed

Thanks! Committed to 7.x and 8.x.

Automatically closed -- issue fixed for 2 weeks with no activity.