Comments (5)
Perhaps it's related to #7. I'll re-re-fix it and please check again this one.
from sections_event.
Ok, now I understood what you're saying. I pushed some local XSLT fixes to version 2.3.2.
- Can the validation messages be consolidated into 1 div instead of having 2 divs?
The idea behind sform:formi
is to gather data about the status of one entry. It accepts a position
parameter which conveniently defaults to first entry. In general, all forms target only one entry in a section. That's why you don't need to set it. But in this case you submit data to multiple entries in one section so you must set this parameter as well. Hands on, Image#2 in your case will incorrectly receive the interpretation from Image#1. The correct way is to call the interpretation for every image like this:
<xsl:variable name="formi-image">
<xsl:call-template name="sform:formi">
<xsl:with-param name="section" select="'images'"/>
<!-- I assume you used the position() function here or something similar -->
<xsl:with-param name="position" select="position()"/>
</xsl:call-template>
</xsl:variable>
The idea behind sform:validation-render
is to pretty render information about only one entry.
If you want to display a consolidated message for all entries, gather all interpretations from all entries and manually write some code to display appropriate message.
- If the entry is edited successfully, it should say so.
- Error messages are not showing.
These are the processing stages. All entries go through each stage simultaneously:
- Prepare incomming data
- Check permissions
- Delete entries
- Check field data
- Set field data
- Replace variables
- Persist entries to database
In your case, Entry#1 passed Stage#4 but Entry#2 didn't.
The success message is applied to an Entry only if it passes Stage#7.
An appropriate error message is applied to an Entry whenever it fails at one stage.
If any entry fails at any stage, processing is stopped after that stage is completed and current status is returned.
from sections_event.
Thanks for the clarification. The fields for the multiple entries I'm creating are actually being inserted via javascript, so if sform:formi
needs to be called for each entry, I can't use it. Even though sform:validation-render
only renders messages for one entry, shouldn't it be able to render all messages for all entries by just reiterating over the returned event xml?
I'll check out the updated utilities to see if it addresses the blank divs issue!
from sections_event.
I'll check out the updated utilities to see if it addresses the blank divs issue!
It won't :)
Even though sform:validation-render only renders messages for one entry, shouldn't it be able to render all messages for all entries by just reiterating over the returned event xml?
No. It's soul job is to render one entry.
If you need to render all entries in given wrapper or something, then ... do it.
Of course there is room for improvement: another sform:validation-render-all
template or similar that would do exactly what you're saying, but it's a niche case at the moment. With Symphony Next these ideas will be thought over for good.
from sections_event.
Alright thanks for your thoughts!
from sections_event.
Related Issues (15)
- Event filter support HOT 7
- Problems when saving special characters HOT 6
- Inserting POST values with an event before Sections Event HOT 3
- Different filters on different sections? HOT 5
- Mutliple sections and Reflection Field HOT 22
- Sections Event and latest members not working HOT 4
- Sections Event without Members extension? HOT 3
- Errors with 1.4 HOT 7
- Unable to get multiple ids in a SBL field HOT 5
- Weird validation errors HOT 2
- Same problem again as issue #2 with latest update HOT 5
- Feature request: custom validation messages HOT 2
- Files not uploading once again HOT 1
- Suggest Feature: Something similar to Fingerprint extension HOT 2
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 sections_event.