Skip to content

Conversation

@sofietoft
Copy link
Contributor

Description

I've updated the "Render Forms" article by removing the macro section.
I've updated the "Themes article" by linking to the "Rendering Forms" article instead of the example using Macros.

Type of suggestion

  • Typo/grammar fix
  • Updated outdated content
  • New content
  • Updates related to a new version
  • Other

Product & version (if relevant)

Forms - 14

Copy link
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, but I'm just wondering if the additionalData feature (relatively recently added, and only needed in a minority of use cases) might confuse things a bit.

So perhaps:

  • Remove the line "This example also adds magic strings replacements using the additionalData parameter."
  • Update the first code sample to be:
@await Component.InvokeAsync("RenderForm", new { formId = @Model.Form, theme = @Model.Theme, includeScripts = false })
  • And then at the end of the section, after the list presented under "Six parameters can be provided" where the additionalData parameter is the last to be discussed, add one more example:

The following example shows how the additionalData parameter is used:

var additionalData = new Dictionary<string, string> { { "foo", "bar" }, { "buzz", "baz" } };
@await Component.InvokeAsync("RenderForm", new { formId = @Model.Form, theme = @Model.Theme, includeScripts = false, additionalData })

@sofietoft
Copy link
Contributor Author

I think that sounds great @AndyButland 💪

I've updated the article based on your suggestion.
I'll merge it once the checks clears 🙌

@sofietoft sofietoft merged commit 7f3186e into main Sep 26, 2024
1 check passed
@sofietoft sofietoft deleted the forms/removeMacro branch October 9, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants