Comments (4)
@PaulLawton227 I hav not tried it with this field, but this technique might work for you.
This example shows how you can remove properties from the model before saving the model to the DB. It works by hooking in to the "saving" event and removing the type. When the model is fetched you set the type based on your other fields.
class ExampleModel extends Model
{
protected static function boot()
{
parent::boot();
self::saving(function ($model) {
/*
* Remove type from saved data because there is no real field.
*/
unset($model->type);
});
self::retrieved(function (License $license) {
/*
* Set the type property so its present when loading the model
*/
$license->type = INSERT LOGIC TO DETERMINE YOUR TYPE
});
}
Dose this work for you?
//Tim
from conditional-container.
It's not possible, because even if you pass the form step on the form view the package would require to know which option you choose in order to show the correct fields on the details / index view..
from conditional-container.
from conditional-container.
Thank you Tim - that worked a treat.
from conditional-container.
Related Issues (20)
- Conditional Container not showing in detail view page HOT 8
- Column not found error when using media package HOT 9
- TypeError: this.field.expressionsMap is undefined HOT 1
- Upgrading to Nova 3.21 breaks ConditionalContainer with HasMany field HOT 5
- BelongsToManyField still not working inside ConditionalContainer HOT 3
- Use of a resource field inside Flexible layout HOT 1
- Fields Are Not Updating HOT 3
- Default and Readonly
- BooleanGroup support HOT 1
- field not shown in index view HOT 4
- v1.4.1 not working HOT 2
- if condition not working with boolean values HOT 1
- Can't download thumbnail if conditionalcontainer is used HOT 1
- Field authorization not working HOT 1
- MorphTo bug
- Add Laravel Nova 4 support HOT 9
- Nova 4 Support HOT 2
- Bug with Boolean Field inside Conditional Container
- Validations not working HOT 2
- how about nova4 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conditional-container.