Jump to content
ryan

ProcessWire ProFields: Table

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

@LostKobrakai: I think you meant "the principle of having a table for each field is one of the ...." :-)

  • Like 1

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks horst!

I've watched a ps tutorial and was able to recover some bits of personality. 

;)

  • Like 4

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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).

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Is there a possibility to preselect a radio button list option in the field?

Share this post


Link to post
Share on other sites

Problem: I've created a page table on a parent with existing children, however PW is not prompting to add existing pages to the table.
I'm sure it did this in previous versions, unless I'm missing something?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
3 minutes ago, Chris Falkenstein said:

Awesome. Thank you greatly.  

Just for the record you mean...


$v->column_name

 

Typo. Its fixed now.

  • Like 1

Share this post


Link to post
Share on other sites

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?

Thanks!

Heather

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Thanks @Macrura!  I'll give i a go tomorrow.   I have Admin Custom Fields already and have been meaning to checkout AdminOnSteroids so this is a great incentive.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...