Loading


Advertisement:

Author Topic: custom field  (Read 397 times)

joss

  • Newbie
  • *
  • Posts: 4
custom field
« on: July 30, 2017, 07:59:14 pm »
Hello

How to move and change the appearance of a custom field created in admin

thank you in advance

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 808
Re: custom field
« Reply #1 on: July 30, 2017, 08:53:54 pm »
What do you mean?

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2509
Re: custom field
« Reply #2 on: July 30, 2017, 10:06:03 pm »
You need a plugin for this.
There's a "sweet" plugin for this in Market created by teseo, seems to be doing a good job and not expensive.

Hello

How to move and change the appearance of a custom field created in admin

thank you in advance

joss

  • Newbie
  • *
  • Posts: 4
Re: custom field
« Reply #3 on: July 30, 2017, 10:45:46 pm »
OK
I created a custom "year" field of type date interval in the admin part
And I would like it to be placed at a specific place in item-post and give an appearance
By giving css properties

thank you

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2509
Re: custom field
« Reply #4 on: July 31, 2017, 02:39:06 am »
Okay, so if you 'linked' the custom field you created to a specific category or list of categories it will appear in item-post if the user is selecting the linked category. The custom field will apear underneith all the other input fields.

With the help of F12 in your browser you can see what and where to change with regard to the css used.

OK
I created a custom "year" field of type date interval in the admin part
And I would like it to be placed at a specific place in item-post and give an appearance
By giving css properties

thank you

joss

  • Newbie
  • *
  • Posts: 4
Re: custom field
« Reply #5 on: July 31, 2017, 04:58:59 pm »
Ok SmaRTeY, but the custom fields do not appear in the files eg "item-post.php" or search-sidebar.php so I can not change the <div>

Or how to do it?

thank you in advance for your help

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2509
Re: custom field
« Reply #6 on: July 31, 2017, 09:21:44 pm »
Can you tell me for what category the custom year field is created and what the link to your site is?
Maybe I can see something there.

Ok SmaRTeY, but the custom fields do not appear in the files eg "item-post.php" or search-sidebar.php so I can not change the <div>

Or how to do it?

thank you in advance for your help

joss

  • Newbie
  • *
  • Posts: 4
Re: custom field
« Reply #7 on: August 06, 2017, 03:12:20 pm »
SmaRTeY
I'm sorry for the delay of my answer

I would like to transform the vertical search menu of the sidebar into horizontal menu as the home page but for the custom fields they do not appear directly in the code I do not know how to modify the appearance of each of these fields

Thank you very much for your patience and help

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2509
Re: custom field
« Reply #8 on: August 10, 2017, 11:18:16 pm »
Hi Joss,

Yes, you define them in Admin and 'link' them to one, several or all categories. They do not appear before you have selected a category in sidebar of search (assuming in Admin the custom field(s) is/are 'linked' and "search" option is set to enabled). This is how the regular search sidebar is setup.

I guess you could try to create a "View" on existing custom fields, loop through them all and use them in your horizontal search bar somehow if you want them to appear from the start and disable/remove the regular hook that adds the custom fields.

As for the styling/CSS, you can use your F12 in browser and see that custom fields on search side bar all use same NAME syntax => meta + counter. There is a function in core class "\oc-includes\osclass\frm\Field.form.class.php" which contains the function "static public function meta". That function is creating the custom fields and also includes the CSS classes being used. Once you know those CSS classes you can probably "overrule" them using your own CSS class(es) OR just modify the css in core which is not recommended with regard to future Osclass updates.

SmaRTeY
I'm sorry for the delay of my answer

I would like to transform the vertical search menu of the sidebar into horizontal menu as the home page but for the custom fields they do not appear directly in the code I do not know how to modify the appearance of each of these fields

Thank you very much for your patience and help