I am just going through the Library Management tutorial. I have completed Article, Library Member and trying to complete Library Membership. DocType for the same as follows:
Have you tried it with edit in full page?
and it that confirm that Doctype Library Member have both fields named first_name and last_name?
And have filled?
Not required any script to do that, i am wondering that why it not working, you are probably be doing some mistake, anyways try this script to achieve that.
where you wrote library_member.first_name, click on the inverted triangle beside it to open all the options for the field. Below the options field are you able to see a Fetch From labelled field?
If so, add library_member.first_name in this field and remove it from options field. Do the same for library_member.last_name. Save the DocType and reload the page.
Now try to create a new membership and see if the first and last name are getting fetched or not.