FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

page part forms (custom fields)

Feed 87 posts, 17 voices

Avatar
108 posts

Hi M,

Thanks for getting back to us.

The error i get is on a MySQL setup. In the root you have a admin, templates, frog and other directories. I renamed the frog to cms and updated all your paths.

Mod rewrite isnt installed at present.

Hope this helps.

 
Avatar
14 posts

I don’t suppose there’s a way to handle uploads/images with this plugin??

 
Avatar
36 posts

@codyf, I agree, that feature would be very much welcomed. M, can you think of a good way to do something like that, if that’s even in the game plan?

 
Avatar
70 posts

@andydtwo

The error i get is on a MySQL setup.

Can you deactivate/activate the page_metadata and then the page_part_forms plug-in? Before that you should backup your database. In the settings dialogue for both plug-ins, there is a delete table option. Maybe the tables where not created for the plug-ins.

\@codyf and \@everflight

I don’t suppose there’s a way to handle uploads/images with this plugin??

Right now there isn’t. I assume you want some kind of attachment feature?

M, can you think of a good way to do something like that, if that’s even in the game plan?

Yes, I know how I could implement that. Give me some time till the end of the week ;)

@everflight

You wanted to post some of your examples …

M

 
Avatar
36 posts

@M Very sweet news re: adding upload functionality. You rock.

Here’s a quick set of screenshots I took of a Page Part Forms field set and the resulting webpage we’re working on. It’s basic at this point, but it works. I modified the CSS in your plugin to accommodate a lot of fields. I hope this gives some people a better idea of what it can do.

More to follow… particularly good examples of form fields we’re using for a winery website project. Drop downs, text fields, and text areas…

View Page Part Form Example Screenshots

 
Avatar
36 posts

Also, M, if you are working on the plugin a bit more… check out Elastic That really might be something neat to add to text areas. You could make them start out a lot smaller, and expand them as people enter more data. Just a thought. Thanks!

 
Avatar
108 posts

Hi M,

Unfortunately that didnt work. I don’t seem to have a table for pagemetadata….should i?

Thanks

 
Avatar
1493 posts

@everflight – great sites you’ve got there. Nice work!

 
Avatar
108 posts

Hey i got it working, your all going to think i am stupid but i left the “true” off of the constant below.

define('IN_FROG', true);

So i disabled the page meta and page form plugins and re-enabled and jobs a gooden!

Thanks everyone for your help.

 
Avatar
36 posts

@andytwo, I had the same problem with define(‘IN_FROG’, true); too! i didn’t think to share that, but I’m glad you got that figured out.

@everflight – great sites you’ve got there. Nice work!

Thanks David! Frog and all of the great plugins available just make it a pleasure to design and develop new sites.

 
Avatar
4 posts

Is there any way to define a default value for a Page Part Form field?

Also, is there any way to make a Page Part Form the default form for new pages?

 
Avatar
36 posts

@jedfoster, if the field is selectable (drop down or radio boxes) it will default to the first value. That said, I’m not sure you can set a default value to other input fields… yet.

+1 on the Page Part Forms being enabled by default, or more specifically, if you have a section with child pages that are all using a particular Page Part Form, it should automatically detect that, and activate that Form.

 
Avatar
108 posts

I think this plugin has the potential to be amazing.

If you could include in the syntax image upload boxes e.t.c There would be no end to the solutions you could provide.

Excellent job, i only wish i had a bit more knowledge to able to help contribute more and move this on to the next stage.

 
Avatar
14 posts

I’m trying to create a multi-select, but I can’t figure out how to set up the YAML to produce this. Can you post some examples as well what you need to generate radio buttons, checkboxes, and the other select options.

Thanks!

 
Avatar
14 posts

Alright, I figured it out. It depends on the limit and the number of items in a list.

For select, limit defaults to 1. So if limit is 1 and…

  • You have less than 5 items in your list, the widget is radio boxes
  • You have between 5 and 10 items in your list, the widget is a list box
  • You have 10 or more items, the widget is a dropdown box

If the limit is greater than 1 and …

  • You have less than 5 items in your list, the widget is check boxes
  • You have between 5 and 10 items in your list, the widget is a list box
  • You have 10 or more items, the widget is a dropdown box (I think this is supposed to be a list box as well)

To make that last item into a list box change line 66 of PagePartFormsController.php from

array(self::SELECT_TYPE_CHECKBOX, self::SELECT_TYPE_LIST_MORE, self::SELECT_TYPE_DROPDOWN),

to

array(self::SELECT_TYPE_CHECKBOX, self::SELECT_TYPE_LIST_MORE, self::SELECT_TYPE_LIST_MORE),
 
Avatar
70 posts

@everflight

I’m not sure you can set a default value to other input fields… yet.

It’s in my local beta, just need to polish it a little bit more.

@everflight

[…] if you have a section with child pages that are all using a particular Page Part Form […]

That is a tricky one. I need to wrap my head around this. Maybe something can be done with behaviours. Currently I see no simple solution for this.

@andytwo

I think this plugin has the potential to be amazing.

Thank you.

i only wish i had a bit more knowledge

Well if you look at the code, it’s nothing that special and not much of sophisticated coding ;)

@codyf

I’m trying to create a multi-select, but I can’t figure out how to set up the YAML to produce this.

Just add the limit: <number> keyword for the page part that have multiple values. You can also give an higher number (e.g. 99).

Can you post some examples as well what you need to generate radio buttons, checkboxes, and the other select options.

That is not possible with a reason. It was a design decision, that the plug-in has some kind of (really simple) fuzzy logic based on the available values and the given limit. The plug-in selects the best representation for the input values. The usage should be as simple as possible.

Examples

If you have only 4 elements and want to allow only 1 selection, the plug-in will generate radio buttons.

select example:
  title: Select examples
  type: select
  values:
    - foo
    - bar
    - baz
    - foobar
  limit: 1
  default: baz

NOTE: default feature is not yet available.

If you want check boxes, you need to allow more than one element, e.g. limit: 2. If you have multiple values, you’ll get a drop down boxes for limit: 1 and a select list with limit: >1.

Hope this helps. Please tell me if this fits your use-case.

M

 
Avatar
70 posts

@codyf

You have 10 or more items, the widget is a dropdown box (I think this is supposed to be a list box as well)

Fixed, will be part of the next release. Thank you for the review.

 
Avatar
70 posts

@codyf

you are too fast for me to reply ;)

 
Avatar
14 posts

@M While you’re making changes, it may make sense to limit the size of the list box to 10 if there are more than 10 items in the list. i.e.,

<select size="10">....</select>
 
Avatar
70 posts

@codyf

it may make sense to limit the size of the list box to 10

Do you have selects with this amount of values? Currently the size is the number of elements. Can you please describe your use-case?

M

 
Avatar
14 posts

Sure, no problem. I’m working on a site for a law firm. For each area of practice (e.g. real-estate law) they’d like to list which lawyers work in that specialty. The lawyers (currently about 15) are in a Page Part Forms list.

 
Avatar
70 posts

@codyf

Understood. I’ll make my head around this how this can be solved in an elegant manner. See Open ticket

BTW: which time-zone you are at?
BTW2: thanks for the wiki updates, highly appreciated.

 
Avatar
14 posts

@M I’m in Mountain Standard (MST)

 
Avatar
36 posts

M, any progress on image/file uploading?

edit. Ah, I just discovered the open issues/requests portion of your Github account. I’ll look there…

 
Avatar
108 posts

Starting to use this more and more now but just wondered how i would format the date to be uk not us? d/m/y

Any help greatly appreciated.

Cheers