Jump to content

ProcessWire ProFields: Table


ryan

Recommended Posts

inputs include text, dates, times, selects, checkboxes, radios, emails, URLs and more

I was hoping to get a complete list of inputs that the ProFields Table field supports. Above list a few, but what is the "more" referring too :)? This thread appears to be talking about two different things and its bit confusing as to which is which.

To be more exact, can you use a page reference field or reference a page with ProFields Table yet? Ryan references it here I think.

If I was keeping a record of employees each having a first name, middle name, last name, age, start date, end date, email, ect. Would ProFields table be preferred then using all separate fields for the above? It seems to me it would scale and be more efficient, being able to pull from one table instead of joining a bunch, making it faster?

Any suggestions or opinions are appreciated. Thanks

Link to comment
Share on other sites

The only thing you can do right now is storing the id of the page, which is not very intuitive/practical in itself.

To your speed concern: I'm not the big database guy, but the principle of having a table for each field is one of the core decisions for ProcessWire. If this would be slow, ProcessWire in itself wouldn't be very scalable at all. 

edited to avoid confusion

  • Like 1
Link to comment
Share on other sites

Thanks for the info on the ProFields Table LostKobrakai. Hopefully that functionality will be added and if not Kongondo actually provided something relevant here using the Events Fieldtype. Of course that module is just a starting point Ryan offered to the community. I will be ordering ProFields Table shortly.

I appreciate the link Kongondo. Ryan does state that the single table is technically faster, but it is good to know the difference is minute. His explanation brushed away any concerns as I approach 700,000 pages.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
If I was keeping a record of employees each having a first name, middle name, last name, age, start date, end date, email, ect. Would ProFields table be preferred then using all separate fields for the above? It seems to me it would scale and be more efficient, being able to pull from one table instead of joining a bunch, making it faster?

I know I am not alone in asking the question above, so I thought this post about efficient use of fields belonged here for others to find.  Particularly the part below I have quoted from the post. There is no doubt in my mind that ProcessWire can handle the multiple fields, but as noted below, its not always the most efficient way.

You may need separate fields for: first_name, last_name, phone, email, company, address1, address2, city, state, zip, and country, and maybe more. That's at least 11 separate fields that could be represented by a single custom aggregate field.
Link to comment
Share on other sites

  • 3 months later...

The Profields Table seems to be a good fit for me in order to multiply accordion panels. 

So I want to add a +1 for the ability to use the ckeditor editor inside the table (perhaps in inline mode).

This would be perfect for small text-formatting adjustments and even adding images with the ›insert image-button‹.

Currently I use a workaround with an extra text-field inside every table-row for manually inserting an image-path.

P.s. Processwire is just wow!   :cool:

  • Like 1
Link to comment
Share on other sites

completly OT: welcome to the forums m-artin.

May I say that your avatar looks a bit like it has got to many noise added with photoshop? As a experienced photoshoper I think this way it looks a bit better:

post-1041-0-06405000-1425708660_thumb.jp

But that's only my personal opinion. :)

  • Like 4
Link to comment
Share on other sites

  • 2 months later...

Hi there,

1. is there an option to hide child pages of a PageTable field from the tree other than having another parent?

2. is it possible to have child pages set to "hidden" by default somehow?

thanks a lot, cheers, j

Link to comment
Share on other sites

@fenton

PageTables are something different to the Profield: Table. But to answer your questions: While both things are possible, they can only be achieved with extensions of the core by modules. For the first one, keep in mind that the page, created by the pagetable, does not differ from other pages. It does not know it's part of a pagetable. Only the data stored for the field does include a reference to the page(s).

Link to comment
Share on other sites

Hi LostKobrakai,

thanks a lot

sorry, I know ...this "Profield: Table thread" got hijacked a few pages back :)

in my case, I can't use the "Profield: Table" option, because it doesn't have multi language support. will see if changing the parent will be sufficient for my setup for now.

cheers, j

Link to comment
Share on other sites

  • 3 weeks later...

Just in case anyone is interested and missed my post in the module's support thread, TableCsvImportExport (http://modules.processwire.com/modules/table-csv-import-export/) now supports all the new options that Ryan added with Table 7-beta - single and multiple page-reference fields and multiple options.

  • Export converts page IDs to the title of the page.
  • Import looks up the titles and populates the table with the IDs of the matching pages
  • Like 2
Link to comment
Share on other sites

  • 9 months later...
  • 1 year later...
  • 2 weeks later...

I've owned this profield for a long time. I guess I never really used it.  It outputs a html table.  I know there's gotta be a way to grab just the values.  I'm not interested in PW generating my HTML (that's what Wordpress is for).  Before I spend time digging, can you good folks let me know how I can just pull the values.  Some foreach loop...?  Thanks.

Link to comment
Share on other sites

Simple

$var = $page->getUnformatted('field_name');
	foreach ($var as $v) {
		//your markup
		//table column name
		$v->column_name
	}

 

Edited by RyanJ
fixed typo
  • Like 1
Link to comment
Share on other sites

  • 7 months later...
35 minutes ago, hezmann said:

Is there any way to have a URL be clickable in the admin?  Or even a link icon next to the input field for a URL?

there is, but it requires using admin custom files and AdminOnSteroids...

see here:

the js goes in the ProcessPageEdit.js, which goes inside the /templates/AdminCustomFiles/ folder (change the fieldnames to match your fields)

and the css goes ProcessPageEdit.css, same folder
 

  • Like 1
Link to comment
Share on other sites

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...