Populate New Row Modal Entry
Populate New Row Modal Entry
![cemlimited](https://secure.gravatar.com/avatar/437eb3dbefb5c426881820cade68f744/?default=https%3A%2F%2Fvanillicon.com%2F437eb3dbefb5c426881820cade68f744_200.png&rating=g&size=120)
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.
This discussion has been closed.
Answers
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));
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 the65
come from? Perhaps you can show me the full PHP script?Regards,
Allan