Coder Social home page Coder Social logo

Comments (5)

wbraganca avatar wbraganca commented on July 30, 2024

https://github.com/wbraganca/yii2-dynamicform#to-zero-or-more-elements-use-the-following-code-in-your-view-file

from yii2-dynamicform.

maheshtc avatar maheshtc commented on July 30, 2024

I have looked into the given code. It has resolved my issue for 0 limit. Now I am able to add form when limit is 0. But It created another problem while updating record. It is working perfect on create action.

For example, I have Article and attachments. I have used dynamic form for attachments where short description and attachment image are fields. Now I have added new article with only 1 attachment image. So On 0th position I have attachment record. Now I want to update article and add another attachment. I clicked "+Add" button and It is cloning same 0th position form with data. Every time I click on +Add button it is cloning same 0th position form. Actually It should clone but with blank.

@wbraganca Did you face this issue? I stick on this position, I am not getting any solution for this.

from yii2-dynamicform.

maheshtc avatar maheshtc commented on July 30, 2024

No Reply. In given example, add Item functionality showing. But while updating record, there is no example. I am facing issue while updating record.

from yii2-dynamicform.

jgrasta avatar jgrasta commented on July 30, 2024
'dynamicform_wrapper', 'widgetBody' => '.container-items', 'widgetItem' => '.item', ---> 'limit' => 10, // the maximum times, an element can be added (default 999) ---> 'min' => 0, // 0 or 1 (default 1) ``` ................... set min to 0

from yii2-dynamicform.

epulgaron avatar epulgaron commented on July 30, 2024

how should be the _controller (actionUpdate & actionCreate) if i want to have two dynamic forms in one view

from yii2-dynamicform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.