Comments (6)
Indeed, in Feed Me you select the section and type and the data you are providing (ID, slug, title, etc). We'd have to introduce a similar UI in Formie to handle that. (FYI, I wrote Feed Me, and am aware of this sort of setup and that it can get complicated quickly!)
from formie.
I did some more testing, and looks like it is looking for a specific element/entry ID to match with. So the value i'm sending obviously doesn't match since it doesn't check for title
and/or id
.
from formie.
So I imagine you might have the ID for an entry in your Single-Line Text field, correct? That might be 2024
which you would like to match an entry element in an Entries field.
That should be possible, but there is a bug with that. Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-4 as 2.1.19"
.
However, I see the error shows Invalid numeric value: 2024\/2025
- what are you actually entering in the Single-Line Text field in Formie?
from formie.
- At first I just entered the
title
(in this case2024/2025
) for a non-existing Entry in the mapped Entry section which gave me the error. - In the test I used an existing
id
of an entry in the mapped Entry section which did work. - I also tried using an existing
title
of an entry in the mapped Entry section which did not work and gave the same error.
So as I understand it works on a existing ID, but it does not work on a Title of an existing Entry.
I'm not sure if its possible, but it would be great if the mapped field would also create an entry if it does not exist already. And also for it to be matched on title instead of just an ID.
from formie.
Gotcha, so yep the value of the entries field will need to be the ID, either a single ID or a collection of them.
I know this was built into Feed Me a while ago (being able to pick what to match on), but that's not something that's built into Formie's mapping at the moment. It's probably something we'll get to one day, but it's quite a complication at the moment, and a whole new UI we'd need to implement (which is on the roadmap, but a way off yet).
Similarly, Formie won't create the element for an element field. It's also probably not something we're planning on supporting due to its overcomplexities. For example:
- How will it know which section/type to create the entry for? An Entries element field can have multiple sources. You'd also need to map or select when of these to use.
- What about if there are additional required fields needed to create the entry more than just title? You'd probably need a method to map against those fields as well, which is starting to get 3 levels deep in element-handling.
I'd say the best place for all this logic would be in an event - and that's probably not going to change anytime soon. It's absolutely possible to achieve what you want with the beforeSendPayload or afterSendPayload events.
from formie.
I totally understand. Would be great to have it in a future version sometimes. Thanks for taking the time.
In our case we can just create the entry in advance and prefill the field with the correct ID.
FeedMe actually can create an entry if the matching "type" is title
instead of an ID
since title is a required field within the entry. I guess FeedMe knows in which section the entry has to be created since the field has certain sections checked (see screenshot).
from formie.
Related Issues (20)
- [2.x]: Issue with summary and field name HOT 2
- [2.x]: Translation problem with subfield prefix and mail var `All Form Fields` HOT 2
- [3.x]: Issue with option `required field` for field date HOT 2
- Formie Import does not delete notifications HOT 1
- `not_authed` error with Slack integration HOT 4
- Name field does not render in preview email notification, nor does it get send in the email notification HOT 2
- Address -> Country field isn't saving HOT 2
- [2.x] Translate issue frontend validation. HOT 3
- Payment Field: Stripe: Hide Postal Code setting not respected HOT 1
- Customer name and Email IDs not displaing in the Stripe dashboard HOT 1
- Add GoCardless Payment integration
- Recaptcha & Payments HOT 3
- Shortest Data Retention possible HOT 3
- Encrypted phone number exceeds 255 character limit HOT 2
- Form submission error when radio button's value is over a certain length HOT 2
- Bug: number doesn't respect max value HOT 1
- Entries field - enable sorting entries by structure order HOT 3
- More Top Level controls HOT 1
- User Registration Integration password isn't set correctly HOT 3
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 formie.