Customize login page with extra views

I have a jobs page. Where a user can click for every job on the job details.

On this job details page, the user can apply for the job. If the user is logged in, I want to see the application fields popuplated by the users defaults (this I can do with JavaScript, no problem) next to the job details. However if the user is not logged in, I want that this view shows a login/register view, next to the job details.

I can’t wrap my head around how to make this work in Knack.

Edit: Added Graphical representation to make it more clear:

Looking forward to your feedback.

Hi @Team

Have you thought about an “Apply for this Job” link which would link to the form behind a login page? I know it’s not what you asked for but I don’t think it will be possible to do this natively. In terms of using JS again I think you will run into issues although one idea maybe to look at iframes but I’ve never tried it.

Craig

Thanks for your answer. I’ve added a screenshot for clarity in the orginal question.
How would you approach the Iframe way?

In the website where I work with the Knack embedding, have an extra Iframe embedded purely for the register/login process? (If so, I would not know on how this iframe will still know for which job we are applying…)