How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • Go back-and-forth until satisfied
    Rate the answer you receive.
Ask LogicPro Your Own Question
LogicPro
LogicPro, Computer Software Engineer
Category: Programming
Satisfied Customers: 5546
Experience:  Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.
29751445
Type Your Programming Question Here...
LogicPro is online now

Bing Thanks for your time. Go to: Give the code that, once

Customer Question

Hi BingThanks for your time.Go to: https://www.ft.com/registerGive the code that, once pasted into the browsers console, will merge the first name and last name fields into one field called "Name" and still wllows the form to validate correctly. This will change the fields from "old-fields.png" to "new-field.png" as outlined in those images.
Submitted: 22 days ago.
Category: Programming
Expert:  Bing replied 22 days ago.

Hello and welcome to JustAnswer, an independent technical support website. My name is ***** ***** it’s my pleasure to be assisting you today.

Can I see a screenshot showing how the original symptom looks like from your side?

Customer: replied 22 days ago.
Hi Bing,No problem I have attached an example screenshot of the question im working on:
Customer: replied 22 days ago.
if you go to https://www.ft.com/register and just open the google console in dev tools
Customer: replied 22 days ago.
im essentially trying to use dom manipulation to answer that question.
Customer: replied 22 days ago.
i.e.const lnf = document.querySelector('#lastNameField');
const fnf = document.querySelector('#firstNameField');const fn = document.querySelector('#lastName').value;
const ln = document.querySelector('#firstName').value;
const fullName = `${fn} ${ln}`;const newEl = document.createElement('div');
newEl.innerHTML = `<label id="name" class="o-forms-field ncf__validation-error" data-validate="required" for="name"><span class="o-forms-title"><span class="o-forms-title__main">Name</span></span><span class="o-forms-input o-forms-input--text o-forms-input--valid"><input type="text" id="name" name="name" placeholder="Enter your name" autocomplete="family-name" data-trackable="field-name" aria-required="true" required="" value="Troy Sheed"><span class="o-forms-input__error"></span></span></label>`;
// replace el with newEL
fnf.parentNode.replaceChild(newEl, fnf);
lnf.remove(lnf);
Customer: replied 22 days ago.
But the above code obviously doesnt account for the validation errors which are not allowing me to submit (i think)
Expert:  Bing replied 19 days ago.

Thanks for your feedback. I am not familiar with the DOM coding, I now opt-out so other experts may contribute further when you are available again.

Expert:  TetyanaP-admin replied 19 days ago.
Hello,
It seems the professional has left this conversation. This happens occasionally, and it's usually because the professional thinks that someone else might be a better match for your question. I've been working hard to find a new professional to assist you with your question, but sometimes finding the right professional can take a little longer than expected.
I wonder whether you're OK with continuing to wait for an answer. If you are, please let me know and I will continue my search. If not, feel free to let me know and I will cancel this question for you.
Thank you!
Tetyana-moderator
Expert:  AlinaK-admin replied 17 days ago.
Hello,
I apologise as we have not yet been able to find a Professional to assist you. Do you wish for me to continue to search for someone to assist you or would you like for us to close your question at this time?
Thank you for your patience,
Alina-Moderator