Populate New Row Modal Entry

Populate New Row Modal Entry

cemlimitedcemlimited Posts: 36Questions: 9Answers: 0
edited December 2021 in Editor

Is it possible to Populate an entry in a New Row Modal from a page php variable?

I have tried numerous methods.....

I want a the "New" Modal window to open with one of the entries populated and locked.

Answers

  • cemlimitedcemlimited Posts: 36Questions: 9Answers: 0

    I am passing the variable $project_id to the ajax.

    I then wanted the Modal window to be auto populated on the page when a "New" selection was made.

    Tried this, but it caused error saying briefs.65 is not a valid column

    $aaa ->field(Field::inst('briefs.project')->setValue($project_id));

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Hi,

    We've just discussed this a little by e-mail - your Field::inst(...)->setValue() approach is correct I would say.

    I've no idea why that would translate into an error talking about briefs.65 - where does the 65 come from? Perhaps you can show me the full PHP script?

    Regards,
    Allan

Sign In or Register to comment.