Jump to content

Fieldtype Button


Recommended Posts

I have started developing a new Fieldtype. This Fieldtype provides a CTA Button for the frontend. The fieldtype stores 3 values for 'label' (multilanguage), 'target', and 'class' (CSS). Output Markup can be edited in the Fieldsettings.

Enter Page id or path in the target field to store an internal page. If page exist the Field will show up the path in current user language and Page ID as well. If you type in a numeric string which is not similar to any pages id, the inputfield will throw an error. Any other string will be stored as is. If target is an internal page any page field value or property is accessible.

The Inputfield optionally provides an API Description.

Please try out:
Feedback welcome. :)

Bildschirmfoto 2016-06-16 um 12.24.26.jpg
Bildschirmfoto 2016-06-16 um 12.23.52.jpg
Bildschirmfoto 2016-06-16 um 12.24.56.jpg

  • Like 11
Link to comment
Share on other sites

  • 5 months later...

hi kixe,

i'll start buy saying this is really neat... now i used this... i tried this in a repeater and i get :

Notice: Trying to get property of non-object in /site/assets/cache/FileCompiler/site/modules/FieldtypeButton/Button.php on line 77

don't know why?

Link to comment
Share on other sites

thanks for the quick reply kixe,

i updated the module....also installed  button fieldtype (multi language).... now i'm getting

Fatal error: Call to a member function getInputfield() on a non-object in /home/pleasefi/public_html/clients/cdcpool1/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.module on line 204

when i try to access the edit option for the page in processwire...

Link to comment
Share on other sites


I was very busy with other stuff today. Now I had a little time to check the module within Repeater (you didn't mention the usage inside a repeater).
I couldn't reproduce your error exactly, but I fixed some other (maybe related) stuff. I pushed an update 1.0.4.

Please try out and tell me if the error still exist. Which PW Version do you have in use?


Edited by kixe
Have to read complete posts
  • Like 1
Link to comment
Share on other sites

7 minutes ago, owzim said:

Pushing code without any kind of testing? :o

Not really. With a little testing (without errors). Obviously not enough! Didn't check the usage inside repeater.

  • Like 1
Link to comment
Share on other sites

hey kixe,

its working really well (1.0.3)... didn't really troubleshoot the issue much.... but what i did was delete the repeater field which had the button in it.. and created a new one with the button... worked like a charm... for me... thanks mate ^-^ 

  • Like 1
Link to comment
Share on other sites

  • 6 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...