Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SD-416] Fixes placeholder issue for Header links #542

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

vincent-gao
Copy link
Contributor

@vincent-gao vincent-gao commented Nov 21, 2024

Jira

https://digital-vic.atlassian.net/browse/SD-416

Problem/Motivation

This PR fixes an issue with incorrect settings where the #placeholder and #default_value conflict.

@vincent-gao vincent-gao force-pushed the SD-416-fix-Header-links-placeholder-issue branch from 65e0b8c to 8db3a16 Compare November 21, 2024 08:40
@vincent-gao vincent-gao marked this pull request as ready for review November 21, 2024 12:23
@vincent-gao vincent-gao self-assigned this Nov 21, 2024
$placeholder_value = $form["field_landing_page_key_journeys"]["widget"][0]["subform"]["field_paragraph_title"]["widget"][0]["value"]["#default_value"];
$form["field_landing_page_key_journeys"]["widget"][0]["subform"]["field_paragraph_title"]["widget"][0]["value"]["#placeholder"] = $placeholder_value;
unset($form["field_landing_page_key_journeys"]["widget"][0]["subform"]["field_paragraph_title"]["widget"][0]["value"]["#default_value"]);
if (isset($form["field_landing_page_key_journeys"]["widget"][0]["subform"]["field_paragraph_title"]["widget"][0])) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a small thing and I know it was already like this, but we tend to use ' rather than " in this context.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hey @anthony-malkoun I have fixed this issue.

Copy link
Contributor

@anthony-malkoun anthony-malkoun left a comment

Choose a reason for hiding this comment

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

Yep, makes sense.

@vincent-gao vincent-gao merged commit 6aa0bae into develop Nov 25, 2024
1 check failed
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.

2 participants