Skip to content

Conversation

pxpm
Copy link
Contributor

@pxpm pxpm commented Sep 4, 2025

In development, this introduces a form in a modal 🙏

pxpm and others added 5 commits September 4, 2025 16:14
@pxpm pxpm added the v7 label Sep 8, 2025

@stack('after_styles')

<script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move these to a global js

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are failing on Github

pxpm and others added 2 commits October 10, 2025 17:43
@tabacitu tabacitu changed the title [WIP] Modal form DataFormModal component Oct 13, 2025
$controller->initializeCrudPanel($primaryControllerRequest, $crud);

// If the panel isn't initialized at all, do full initialization
if (! $crud->isInitialized()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something here smells a bit - maybe we can return early or smth

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick cleanup pls - indentation etc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please test the field stacks - try to push some widgets to before_content and after_content

public function __construct(
public string $controller,
public string $id = 'backpack-form',
public string $operation = 'create',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make sure we can also call a custom form operation. (not urgent)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public string $operation = 'create',
public string $formOperation = 'create',

public string $controller,
public string $id = 'backpack-form',
public string $operation = 'create',
public string $name = '',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public string $name = '',

data-has-upload-fields="{{ $hasUploadFields ? 'true' : 'false' }}"
data-refresh-datatable="{{ $refreshDatatable ? 'true' : 'false' }}"
>
<div class="text-center">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an elegant way for us to tell the form blade file to NOT use the card and card-body classes? Both the Dataform and DataformModal would benefit from this tiny change:

https://www.loom.com/share/fc4693f505ba47cf8dfb5a75a923c537

pxpm and others added 4 commits October 16, 2025 16:08
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's another round of testing. I discovered:

  • quite a few fields don't work select2s, browse
  • edit modal doesn't load the entry
  • after an entry is created with DataFormModal, sometimes the datatable refreshes, sometimes it doesn't

Here's a 5-min tour of my experience:
https://www.loom.com/share/6bffaa54f65e4c7f8b4188e064ca0bb7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants