Skip to content

029 How to overwrite the custom fields

Llewellyn van der Merwe edited this page Dec 19, 2018 · 17 revisions

It happens that you would like to use some of the default fields Differently than hell component builder is actually implementing it Now what is the default fields If you go to Add a new admin view or if you go to an admin do that already exists like I've open one here You see that there is this your mode Just above adding fields It says that the ID The asset ID the state The access the ordering the created by the date created modified by Date modified Checkout Check out time virgin Hits metal key Meta description and metadata Is already added to the view so these are your default Feels That always gets added to the view even if you don't create them in fact you don't need to create them But I have seen that sometimes you might want to display some of these fields in a different air Area Of the application You see currently The it field and published Where is it I think that State Yeah Estate field Is the only field that is been shown by Default In the listview So here you can see there is the ID field and there is two states field I'm only ordering feel buddy ordering field Obviously Show the other number you basically click on that button there And then you can move them All them so all that is done by Default and so as you can see The sorry The other Values are not displayed in the listview And so I had a client while saying to me that they would like to actually see the date that something was created And also by whom it was created I'm so I had to adapt component builder so that those things can also be overwritten And this is exactly what we've done What is done is if you create a field In component order as you would normally create a field and you give it Any of these names he created by or created date but obviously exact Jackie the same name then it actually will override The default so in this specific view the job order View Scuze me There is a field Created by So I can open that A new tab there is also a field Created That's basically the day images Serious Oh that is great day Close open So in the Field You see that I basically used The name created by Is obviously a user is the type of fuel And the label is created by the user that created this is the description And that's all that's needed For a user type Then In the created date Basically it's a calendar time And I used created The date it was created The label and some of its default now these values if you don't know them You can actually go and look At the compiled Field Let me let me show you that In the backend of your component that is administrative components Then the relevant component Utopian models and then there is a place called forms And you would basically open that And you'd see a list Of forms that correspond to the back interviews that you've created so now k's This job order Is the one You're obviously open the XML So you double click on it And then scrolling down You can look at modified by And some of its default So you gonna overwritten I'm sorry I write this value Then you need to update or basically use these values here Make sure this is the only part that is Should change it to change it We won't know But you're trying to Override Default feels because it basically uses the name As the identifier Ok so back here Basically created the fields that was the first bar Close them again And then We would like any normal any other field Recently went to fields And we added those Fields So yeah you would see Scroll down There's the created date and there is the created by We had both to be shown and also the position Now it should be treated And we said it was be in the left tab Of the 15th Oh yeah that's the other thing If you would like the fields do again this play the same place as before in the edit Then you would add it to the 15th tab I reckoned that it Very unlikely that somebody would create so many tabs What is a turnip If you were to go to the view Then this is Tab 1 the Step 2 3 4 5 and 6 So Since publishing can really very It wasn't Making any sense to me that I would Targeted in any way Directly as the 5th of the 4th So I took a very high number 15 Not very obvious and this is why I had to make this tutorial If you select the number 15 It will basically add these two fields in the same place it would if it had to build it for you But if for some reason you say no I want to also display the field in a different tab You could actually click and say let's say put in in the 3rd to have you click save And and then you would compile The components install it And then UC 12 3 it's in the third tab It's showing up So That's All You Had to Do as they had to say and what stab you would like it now to display you go here it says No longer shows in the probably stab the create date I need a created by that shows up here so it literally moves the field to a different tab As well as Now displays the field In the listview And that Simply because you added the value the fields here you said that you wanted to display and you added I'm gonna move it back to 15 Which is the tab number if you wanted to be in its default place Save Safair File this Updating the component Refresh the page and now If we go to where it was it's no longer showing there it's not showing there Showing there it's back in published in the correct place that's where it Will usually anyway be said if you don't override it so using the 15th tab As the the target Putting it's default place And if you use another tab number it removes it from its default place and put it where you at Decided to be placed well that is how you can override the custom Added fuel Tower Fields of a backend View I hope that will be very helpful Thank you for watching

Clone this wiki locally