-
-
Notifications
You must be signed in to change notification settings - Fork 176
053 Quick Subform Demonstration
A present they had this Request on the Forum By Marco Regarding some help with Sub forms How to generate a subform itself writing in JCB Where to find the XML details in relation to repeated subform fields in View How the date of the subform is populated How posted data of a subform is validated How the data of a subform is processed and Persisted My Samsung is it above is done as part of JCB and would not require manual construction Of XML files Reduce Google find an answer to no avail Yes At the moment We have Only made tutorials about I think repeatable fields And repeatable Fields as such has been discontinued I don't think I've actually made it story about subforms as yet So here it goes let's do it Ok first thing First Subforums have fields in them that much we know right So if we gonna go to component for example and it's a we open this app and view We are actually looking at a subform ride this is a subform And each of these little Fields here is a field in the subform And actually is only an ID which you need to add to create Getting the stuff form so what do you do if your first create what this is a dynamic Custom field The basically grabs values out of the admin view so this is a custom field this one You create that one this is a list field You create list field this is a checkbox so you basically create these Fields First That's the first thing you do you create a field you wanna use in the subform So for our purposes I'm gonna use existing fields I just to saute demonstrate Ok so we've got what we have the description mobile number name we got a few Fields here Ok so First we wanna create a new field So I'm gonna Fastest creator Open the warehouse open so I can get the ID is So then here click new And basically select subform right Sop form there we go N8 actually populates your XML for you Now something tells me That If you haven't actually looked at all the tutorials That is available on Google Sorry on YouTube Then a lot of us were maybe not even make sense of what I'm doing where I'm doing it and all that and So For those that maybe just seeing this video for the funeral haven't watched any of the other tutorials Please go to YouTube and type in Joomla component Builder And try to find the playlist there's old playlist full of tutorials Start at the top working through way down it so many tutorials many hours that I've spent trying to t Teach And by people in using this component and I know it does tutorials will make you You quite able to build amazing things Ok so I'm gonna just leave this options the option list This form source if you read here you can add a path to an XML file containing the field So you can add a custom A XML file to your component how to add custom files to component hold not a topic it's It's also possible within your controller component to add files and folders all those kind of things But that means this specific source can still be used but you don't need to If you Use the fields Option then you basically need to remove the source option right only one of them so I need the fields All the fields form source So these are the two options I see it's currently set to mandatory the fields But I think you can change that Going to the few pipes change that to optional And then that you can select other Fields or field source form source I think the compiler will in any case if it it takes it there is a form source it will behave correctly Ok so here we need to add the ID is so we can come here and I want to have a name Sources 199 I just add 199 and 8 comma And then let's add something else let's say Website 280 So it's 280 And let's do an email as well Where is it There's no email here oh there's an email And it's 100 Ok so where That in place we can add a description We can add a maximum A filter a show on I'm just gonna leave this the validation of these fields I think That is an area which I haven't actually looked into But if I'm correct And also the reason why they moved away from repeatable fields Is that every field is validated On its own merit So for example The name field If you create a name field you're obviously Saying ok I want this to be a string and it has this filter string Value And since this is part of the XML it will be validated on this I can be mistaken here And yeah I haven't actually looked at the code so my dad but that's That's what I anticipate it will do most cases I would say Anticipate that it doesn't and try and do some custom scripting I'm not gonna illustrate that now Are you need to Actually no little bit more about JCB which there are tons of the toriel stew show you How to do custom scripting all around it component and even to do custom scripting anywhere and in Any area of the component through the custom code area implementation So I'm gonna talk more about that now So For now we want to Just Make sure it got all the spelling right here Ok good I'm gonna save this just give it a name Options and test so I can see it This obviously I would make A text The default means that JCB already Store method It already has The air it will detect that this is a sub Form Animal add the needed PHP in storing the file and in loading the file into the form again So that takes care of that So you don't need to actually say Jason it it will On its own by its default to the correct implementation here so you need to sort it out it click Text or medium text depending on what this value is gonna be Anyway I think 4:50 text is quite enough And that's it saving close Ok Sorry about that Elspan there Let's see with got that field here it is I'm gonna just add it to any view for now Let's see I'm gonna add it to this look View Just so we can see it in action Zelda look beauty part of the demo component So I'm just gonna dump it in here that's y Above to have full with details A description I think let's just add it there Details also full width Naked the 2nd And I say Options And then we got a test right Ok save and close so we've added it to a view Now I'm just gonna compile this component which the view belongs to Which at this stage it is demo Uninstall it Now let's go open that component And let's open a look And here we go name enter name here enter website address enter email Matric there And our values are there Let's you save 1 High Children We can do I think that's the only one that's Oh yes you do have Let's do that and why enter those values and then some Value Sorry And I'm just gonna grab this Appear Basted in there few times Just gonna put here Jamala at VDM driver Put that in here Together sort of a feel for it Ok save Ok it's saved the values it loaded it back it's done all of that high There Rand 7 close ISO If we open it again It it shows it up again And now we can shuffle it Let me just put Number for Top So close And open again And so it is loading it also correctly Ok well that's a quick dinner station Marco I hope this helps And getting you able to use subforms With JCB Is as easy as that Thanks for watching
- Home
- Beta Testing
- Custom Code
- PHP Settings
- Demo Component
-
Tutorials
- Hello World JCB
- Intro JCB Guide
- JCB Installation Steps
- Planning Components
- Field Type Overview
- Basic Fields Creation
- Admin View Management
- Advanced Field Usage
- Admin Component Integration
- Component Setting Customization
- Scripting Components
- Component FTP Options
- Dynamic Get Method
- Site View DynamicGet
- Site View Templates
- Template Setup Guide
- Layout Configuration Steps
- Custom Admin Management
- Adding Site Views
- Custom Admin Integration
- MySQL Demo Tweaking
- Global JCB Settings
- Custom Time Field
- User Helper Integration
- Email Helper Usage
- Message Store Email
- List View Unescape
- Export Import Customization
- Overwrite Custom Fields
- List Field Filtering
- Automatic Code Import
- Manual Code Implementation
- Component Export Import
- Custom Admin Buttons
- Translation Management
- Site View Permissions
- Component SQL Updates
- Site Edit Configuration
- JCB Backup System
- Helper Structure Integration
- JCB v2.5 Upgrade
- Tab Setup Guide
- JCB v2.6 Release
- Extended HelloWorld
- Field Rule Validation
- Community Snippets Intro
- Snippet Forking Tutorial
- Pull Request Snippets
- Library Manager Area
- Excel-based Translation
- Dynamic Router Details
- Database Auto Updates
- Subform Quick Demo
- VDM Package Import
- Dynamic File Inclusion
- File Field Upload
- Drag-n-Drop Upload
- Quick HelloWorld JCB
- Non-database Fields
- Dashboard Customization
- Menu Prefix Toggle
- Community JCB Packages
- Collaborative JCB Workflow
- JCB Package Install
- JCB JAB18 Event
- Convenient New Fields
- Component Language Strings
- Library Functionality Anticipation
- Join Field Relations
- License Template Change
- Code Reusability
- Local Dev Environment
- Extended Field Types
- Joomla Custom Fields
- Custom Field Expansion
- Site View Listing
- Run Expansion Method
- Form Site View
- Field URL Update
- Additional Helper Methods
- Field Validation Rules
- New Placeholder Feature
- Component Config Params
- Per-field Default Values