[html-formfu] Repeatable block will not save records

2008-12-30 Thread Ascii King
I have created a repeatable block and it populates correctly, but it will not save any changes I make to those records. It will save the previous fields in the form, though. I am using Catalyst and Formfu. Here's my calling subroutine. I've taken it from an example online and added the repeatable

Re: [html-formfu] Repeatable block will not save records

2008-12-30 Thread Ascii King
I have investigated and found that I can only save the first record in any has_many relationship. This is the same problem listed in this post http://lists.scsys.co.uk/pipermail/html-formfu/2008-February/000972.html The answer there was to add the hidden count field, but that is not working fo

Re: [html-formfu] Repeatable block will not save records

2008-12-30 Thread Ascii King
any other suggestions I will definately try them. Moritz Onken wrote: Am 30.12.2008 um 20:41 schrieb Ascii King: I have investigated and found that I can only save the first record in any has_many relationship. This is the same problem listed in this post http://lists.scsys.co.uk/pipermail/html-f

Re: [html-formfu] Repeatable block will not save records

2009-01-01 Thread Ascii King
Thanks for your help, Moritz. I can still only save the first record in any many-to-many relationship, though. I have created a little test project to try out your suggestions. The only part I do not understand is how to ensure the schema is in the form's stash. I'm afraid I don't understand how

Re: [html-formfu] Repeatable block will not save records

2009-01-02 Thread Ascii King
I started from scratch using the updated Catalyst tutorial and reread the documentation. The model_stash problem makes more sense now. I have set it in the MyApp.conf file. I am still guessing that the ModelName is supposed to be 'DB'. However, even starting from scratch and only adding the b

[html-formfu] Repeatable prepends nested_name to element names

2009-01-06 Thread Ascii King
Why does my nested_name get added to the beginning of every field created by my repeatable element? The documentation doesn't mention that. I'll give more code than I think I need to in case it is something I am doing. This part of my edit.yml file: id: form auto_id: %n (further down)

Re: [html-formfu] Repeatable block will not save records

2009-01-12 Thread Ascii King
type: Hidden name: count The documentation says that the "- type: Hidden" is only needed if you want to add multiple new empty rows (new_empty_row_multi), but in my experience, this isn't true. You need it and the counter_name line if you have more than one row. Ascii King w

[html-formfu] Delete option in repeatable block does not work

2009-01-21 Thread Ascii King
I can't get the delete checkbox to function in my has_many repeatable block. It has never worked in any of the test websites I have created. Here is the code I use, though I have removed the extraneous bits. # ** REPEAT APPOINTMENTS -- - type: Repeatable nested_name: appointments c

Re: [html-formfu] Repeatable block will not save records

2009-01-21 Thread Ascii King
David Schmidt wrote: Another thing, when I have no Repeatable present (thats the case when I create a new instance of the object related to the form) I dont want an empty Repeatable block. Is there a way other then having 2 seperate form configs? greetings david I don't know how to do it wi

Re: [html-formfu] Delete option in repeatable block does not work

2009-01-22 Thread Ascii King
Carl Franks wrote: 2009/1/21 Ascii King : I can't get the delete checkbox to function in my has_many repeatable block. It has never worked in any of the test websites I have created. Here is the code I use, though I have removed the extraneous bits. # ** REPEAT APPOINTMENTS -- -

[html-formfu] Incremental id for repeatable element

2009-01-23 Thread Ascii King
Is it poosible to specify a different characteristic for the first record in a set? I would like the class in the first repeatable block to be different from the rest of the class tags. Something like a first_record_attributes option. - type: Repeatable nested_name: gg counter_na

Re: [html-formfu] model_stash + model_config with ComboBox element

2009-01-27 Thread Ascii King
What a wonderfully useful tip. Thank you. I didn't understand why I was told to put my Model in the stash as it seemed to make no difference. Now I do. This is much easier than the long, coded way. However, how can I specify which column I want to use in the table? My lookup table contains a fe

Re: [html-formfu] Delete option in repeatable block does not work

2009-01-28 Thread Ascii King
Carl Franks wrote: 2009/1/22 Ascii King : Thanks. That fixed it. I couldn't find anything on the test suite through Google though. Is that the SVN that people keep mentioning? Do I use RapidSVN to access it and is there a link to an explanation on how to use it? Yes, you can b

[html-formfu] Repeatable within a repeatable?

2009-02-23 Thread Ascii King
Can you have a repeatable element within a repeatable element? If so, is there some special way to set it up? ___ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Re: [html-formfu] Repeatable within a repeatable?

2009-02-23 Thread Ascii King
I was trying it and failing, but I see now that I was doing it wrong. You can have a repeatable element within a repeatable element. Works nicely. Carl Franks wrote: 2009/2/23 Ascii King : Can you have a repeatable element within a repeatable element? If so, is there some special way to

[html-formfu] Attributes in Checkboxgroup

2009-02-23 Thread Ascii King
I have created a Checkboxgroup, but I cannot figure out how to place a class in the SPAN tag that surrounds each option. The tags breakdown like this: I want to know where do I specify the attribute to get the class into the place where it says

Re: [html-formfu] Attributes in Checkboxgroup

2009-02-25 Thread Ascii King
Thanks, Carl. It was a big assumption. This solution is a big help. Carl Franks wrote: 2009/2/23 Ascii King : I have created a Checkboxgroup, but I cannot figure out how to place a class in the SPAN tag that surrounds each option. The tags breakdown like this

Re: [html-formfu] Repeatable within a repeatable?

2009-02-25 Thread Ascii King
I am using HTML-FormFu-Model-DBIC. I don't know how to write tests for it though. I can report on my progress if you'd like. I'll also be aware of this the next time I upgrade and test it manually. Carl Franks wrote: 2009/2/23 Ascii King : I was trying it and failing, but I

Re: [html-formfu] Attributes in Checkboxgroup

2009-02-25 Thread Ascii King
Thanks again. However, I only know how to upgrade from a CPAN module. What is the command to update from the svn? Carl Franks wrote: 2009/2/23 Ascii King : I have created a Checkboxgroup, but I cannot figure out how to place a class in the SPAN tag that surrounds each option. The tags

[html-formfu] Repeatable attribute and auto_id

2009-02-26 Thread Ascii King
If I set the auto_id in a repeatable element, it seems to affect all elements within the main block but not the main block itself. I need it to affect the main block. Am I doing it wrong? Here's what happens. This code: - type: Repeatable nested_name: appointments auto_id: %n

Re: [html-formfu] Repeatable attribute and auto_id

2009-02-26 Thread Ascii King
ot asking a question here. Just broadcasting my intentions. Carl Franks wrote: 2009/2/26 Ascii King : If I set the auto_id in a repeatable element, it seems to affect all elements within the main block but not the main block itself. I need it to affect the main block. Am I doing it wrong?

Re: [html-formfu] Having issues with nested repeatable loading from db.

2009-03-05 Thread Ascii King
For starters, I don't think it is supposed to be "schema = DB", just "schema DB" schema DB Also, could you show us the may_have line that sets up the 'debits' relationship? Leanan Sidhe wrote: I'm attempting to make use of the $form->model->default_values and $form->model->

[html-formfu] Subforms show up as text fields

2009-03-05 Thread Ascii King
My forms config file has gotten so large and unwieldy that I need to break it up into subforms. However, whenever I call a subform, the elements return as text elements and only the last element called shows up. For example, this config file: --- indicator: submitted elements: load_config_fi

Re: [html-formfu] model_stash + model_config with ComboBox element

2009-03-05 Thread Ascii King
Is there some reason this will not work within a repeatable group? I have this set up and it runs fine unless I move it inside a repeatable block and then it will not populate. BTW, you could get rid of all that code to populate $select->options() by making sure the appropriate Model is in you

Re: [html-formfu] Subforms show up as text fields

2009-03-05 Thread Ascii King
I tried using Leanan's code almost exactly. The only change I made was to remove the quotes around the filenames. I still get the following error: |"Can't locate object method "elements" via package "HTML::FormFu::Element::Text" I'm sure this is referring to the 'elements:' line in the subconf

Re: [html-formfu] Subforms show up as text fields

2009-03-05 Thread Ascii King
I have tried it with just the three dashes. It just moves on to the next error. I notice that your sub configs don't have the '---' line... out of curiosity, what happens if you just add that line to the very beginning (leave all else as it is)? It does this. Just finds the next object method

Re: [html-formfu] Subforms show up as text fields

2009-03-05 Thread Ascii King
I solved it, if anyone needs to know. I checked out the tests and found the test for the load_config_file. I needed to add something that accepted an elements list, like a Block or else it misunderstood whatever config file I called. #main.yml --- elements: - type: Block load_config_file

Re: [html-formfu] model_stash + model_config with ComboBox element

2009-03-09 Thread Ascii King
Carl Franks wrote: 2009/3/5 Ascii King : Is there some reason this will not work within a repeatable group? I have this set up and it runs fine unless I move it inside a repeatable block and then it will not populate. I don't know, I don't think I've tried it. Can you

Re: [html-formfu] Repeatable within a repeatable?

2009-03-10 Thread Ascii King
y data. It does however display the right number of Equipment records, but the fields are all empty. Any thoughts? Ascii King wrote: I am using HTML-FormFu-Model-DBIC. I don't know how to write tests for it though. I can report on my progress if you'd like. I'll also be aware of t

Re: [html-formfu] Repeatable within a repeatable?

2009-03-11 Thread Ascii King
o interpret the new fieldname with the extra underscore and number? example: id="persons.equipments.equipment_id_1_3" /> Ascii King wrote: I amusing FormFu with Catalyst to load a very complex form. I am testing a repeatable within a repeatable call to the database and it is fai

[html-formfu] Creating a new record

2009-03-16 Thread Ascii King
I use the following code to call my formfu form. When I want a new, empty record, I just call the sub with no parameters. It works well except for the repeatables. My repeatable elements on the form load every record in the 'many' table. What am i doing wrong? sub editprior : Local FormConfig

Re: [html-formfu] Creating a new record

2009-03-17 Thread Ascii King
I have a has_many relationship between Character.pm and CharacterBackground.pm I apologize for the long names, but I was trying to make sure it wasn't the naming that was causing the problem. When I call a new record from Character and use a repeatable element to pull up and display the Chara

Re: [html-formfu] Creating a new record

2009-03-18 Thread Ascii King
>response->redirect($c->uri_for('/prior/list_prior')); $c->detach; } else { $form->model->default_values($book); } Ascii King wrote: I have a has_many relationship between Character.pm and CharacterBackground.pm I apologize for the long names, bu

Re: [html-formfu] Can only delete first row in has_many, can't figure out why

2009-03-24 Thread Ascii King
When it will only delete the first row, it seems to mean that there is a problem with the relationship. If there was a problem with the delete_if_true then it wouldn't delete any rows. Do you get more than one row of data back from the database? Leanan Sidhe wrote: Form might_have foobar Fo

[html-formfu] Different attributes for the first record in a repeatable block

2009-03-26 Thread Ascii King
I apologize for asking this twice, but I have not yet solved it. Is it possible to specify a different characteristic for the first record in a repeatable? I would like the class in the first repeatable block to be different from the rest of the class tags. Something like a first_record_attribu

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-26 Thread Ascii King
outputs: This is wrapped around all of the elements in the Repeatable block. Thanks for the tip about the first-child. I tested it, but couldn't get it to work. I will have to read up on it. Carl Franks wrote: 2009/3/26 Ascii King : I apologize for asking this twice, but I have not yet s

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-26 Thread Ascii King
hunk' }); $Repeat_field->attributes('class' => 'foo'); Carl Franks wrote: 2009/3/26 Ascii King : I believe the output of a Repeatable is wrapped in div tag. I use the following code to generate a div tag. - type: Repeatable nested_name: appoin

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-26 Thread Ascii King
I read the documentation. I swear! :) Will the get_field function grab a div tag? I can't get it to, even if the tag is not in a repeatable element. The div tag I want is buried in some fieldsets, so do I need to use 'get_all_element'? Truthfully I've tried every combination and I can only get

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-30 Thread Ascii King
I should have realised from the name 'repeat_chunk' that you were searching for a Block, not a field. Yes, you need: get_all_element() See? I'm not lazy. Just dumb. ;) I suspect what's happening here is that the rep blocks aren't getting the 'name' copied over. If you use Data::Dumper

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-31 Thread Ascii King
rote: 2009/3/30 Ascii King : I suspect what's happening here is that the rep blocks aren't getting the 'name' copied over. If you use Data::Dumper, you should be able to confirm that. If that's the case, could you commit a fix? Cheers, Carl So, I'm no

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-04-01 Thread Ascii King
That's great, thanks. That's almost exactly what I had except I had put brackets on the end of the get_elements, so I couldn't get it to work. Carl Franks wrote: 2009/3/31 Ascii King : That works great! Thank you. How do I count the number of elements returned by the

[html-formfu] get_all_element - what's an element?

2009-04-01 Thread Ascii King
Are the elements referred to in get_all_element only form fields and block tags? Can a link be an element? Is it possible to grab this: Add Another Expenditure How do I do it? The following examples fail. $Repeat_field = $form->get_all_element({ name => 'expenditure_count', });

Re: [html-formfu] get_all_element - what's an element?

2009-04-01 Thread Ascii King
OK. I was creating the tag improperly. Like this: - type: Block tag: span content_xml: Add More Records Once I saw your explanation I broke it into it's own tag and it works now. Thank you. (I needed the span tag) - type: Block tag: span elements: - type: Block

[html-formfu] Writing Catalyst - FormFu tests

2009-04-08 Thread Ascii King
I'm trying to write a test to demonstrate a problem I am having with Formfu and Catalyst and a repeatable within a repeatable. I am only just learning how to write tests. Is the following test a good example of what I should be doing? http://html-formfu.googlecode.com/svn/trunk/HTML-FormFu-Mo

[html-formfu] nested repeatables not showing data

2009-04-08 Thread Ascii King
I am using FormFu with Catalyst to load a very complex form. I am testing a repeatable within a repeatable call to the database and it is failing to display the data from the database. Organization -> has_many -> Person -> has_many -> Equipment An Organization (table) has many Person (table) r

Re: [html-formfu] Writing Catalyst - FormFu tests

2009-04-08 Thread Ascii King
b file. You can simply copy the lib folder inside t/ and call this method in your tests, too. Am 08.04.2009 um 16:33 schrieb Ascii King: I'm trying to write a test to demonstrate a problem I am having with Formfu and Catalyst and a repeatable within a repeatable. I am only just learning ho

Re: [html-formfu] Writing Catalyst - FormFu tests

2009-04-08 Thread Ascii King
Doh! Thanks. Moritz Onken wrote: Well, the test folder is not installed on your machine. you need to get the source code from cpan or svn: http://search.cpan.org/CPAN/authors/id/C/CF/CFRANKS/HTML-FormFu-Model-DBIC-0.03007.tar.gz ___ HTML-FormFu m

Re: [html-formfu] nested repeatables not showing data

2009-04-16 Thread Ascii King
I've written a test to cover the has_many to has_many but i'm still working out how to submit it. I will check the new code right away, though. Carl Franks wrote: 2009/4/8 Ascii King : I am using FormFu with Catalyst to load a very complex form. I am testing a repeatabl

[html-formfu] Using the SVN code

2009-04-16 Thread Ascii King
Is there an instruction set or tutorial somewhere that will show me how to use the updated code that hasn't been posted to CPAN yet? I am using Ubuntu 8.04 and a standard Perl install. ___ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http:/

Re: [html-formfu] Using the SVN code

2009-04-16 Thread Ascii King
I have found the same directory structure as the svn under /usr/local/share/perl/5.8.8/HTML/ so do I just copy the files to that directory? Ascii King wrote: Is there an instruction set or tutorial somewhere that will show me how to use the updated code that hasn't been posted to CPAN ye

Re: [html-formfu] nested repeatables not showing data

2009-04-17 Thread Ascii King
Ascii King wrote: I've written a test to cover the has_many to has_many but i'm still working out how to submit it. I will check the new code right away, though. Carl Franks wrote: 2009/4/8 Ascii King : I am using FormFu with Catalyst to load a very complex form. I am testing a repe

Re: [html-formfu] nested repeatables not showing data

2009-04-17 Thread Ascii King
repeatable element? Ascii King wrote: Woot! Preliminary tests show that the code is working now. Bless you! My entire job just got a lot easier. I have tested the code against my app and it seems to read the data in, but won't save it. I will test a bit more. I have written a write test

Re: [html-formfu] Writing Catalyst - FormFu tests

2009-04-17 Thread Ascii King
So, I have updated the schema to include a has_many to has_many relationship and written a test for it. I have logged in and checked out the code, modified and updated it. When I try to commit it, it asks again for my login. Is this because i don't have rights to modify the code? Is there someo

Re: [html-formfu] applying a filter

2009-04-30 Thread Ascii King
I am unable to figure out what was decided here. I am trying to set up a simple page to accept a new user with an encrypted password. would someone be able to show me what I need to add to my config file, subroutine and my .yml file to make this work? I only ask because it seems the answer put

[html-formfu] Password hash gives different results each time

2009-04-30 Thread Ascii King
I have a password field that I am trying to encrypt using some code provided by David Schmidt. It seems to work, except that it returns a different value each time, even if the passwords are the same. Is this because it is operatijg on the object or the hash and not the value? Here is my code.

Re: [html-formfu] Password hash gives different results each time

2009-05-01 Thread Ascii King
Thanks. I have trouble reading through the dump because it returns so much data. Carl Franks wrote: 2009/4/30 Ascii King : I have a password field that I am trying to encrypt using some code provided by David Schmidt. It seems to work, except that it returns a different value each time

Re: [html-formfu] Re: Repeatable save problems

2009-05-01 Thread Ascii King
This won't be the problem, but I can show you a trick to save you some typing. I see that you wrap each element in a block tag. I assume you do this so that you can put the class in the surrounding div tags. I have the same requirement. You can do it easily by using "container_attributes"

[html-formfu] Securely set the account status

2009-05-08 Thread Ascii King
I am using Catalyst and the Authentication plugin to handle logins. I have a field called status which I use to determine if the account has been activated or not. The three settings for this field are 'Active', 'Disabled' and 'Requested'. How can I securely set the field to 'Requested' from th

Re: [html-formfu] Securely set the account status

2009-05-08 Thread Ascii King
I should have mentioned, that I am currently doing it this way. my $set_status = $form->get_all_element({ name => 'status' }); $set_status->attributes->{ 'value' } = 'Requested'; But, I know grabbing the element isn't the proper way.

Re: [html-formfu] customize display of error messages

2009-05-11 Thread Ascii King
I know this is old, but here is the fastest way I have seen to accomplish this. Just add some css code to handle the error_message display. Ffor example: form .error_message { color: #CC !important; display: block; } Carl Franks wrote: 2009/2/4 abhishek jain : hello, I wish to c

[html-formfu] Inflator Deflator Transformer

2009-05-11 Thread Ascii King
I want to have a total field automatically be the sum of two other fields. I assume this would be a transformer, but I am not sure. I cannot figure out how to send the other two fields to the sub-routine. The documentation just says that you can send them, it doesn't show you how. ___

Re: [html-formfu] Repeatable displays every row in table (bug?)

2009-05-11 Thread Ascii King
I had this same problem back in this thread http://lists.scsys.co.uk/pipermail/html-formfu/2009-March/001884.html the answer was how I was calling the new record. I eeded to use find_or_new to call a new record. my $book = $c->model('DB::MyTable')->find_or_new({ id => $id }); Mario Minati wr

Re: [html-formfu] re: Confusion with options_from_model and many_to_many

2009-05-27 Thread Ascii King
I get similair problems, Toby. One thing you can check is to see if your select box is inside a repeatable element. The select and the repeatable don't like each other too much, so maybe it's the same with Checkboxgroup. A big problem I find with the documentation is the fact that everything h

[html-formfu] Example code for enforcing unique column value

2009-06-04 Thread Ascii King
Does anyone have some example of the code they use to enforce a unique value in a column using Catalyst and FormFu? I have the database set up to not allow duplicate values, but I don't know if it's unique until I get the error back. This can't be the way. I am sort of assuming that I would ne

Re: [html-formfu] How to best pass the resultset object to DBIC validator callbacks?

2009-06-04 Thread Ascii King
This Validator references a bit of code (validator_unique_url) that presumably calls the database to check to see if the value is unique. Would someone be able to show what this code would actually look like? I have the rest of the validator example from this thread. Then in MyApp::Schema::Resu

Re: [html-formfu] How to best pass the resultset object to DBIC validator callbacks?

2009-06-05 Thread Ascii King
Thanks, Wolfgang. That did the trick. Wolfgang Kinkeldei wrote: Hi, Am 04.06.2009 um 21:40 schrieb Ascii King: This Validator references a bit of code (validator_unique_url) that presumably calls the database to check to see if the value is unique. Would someone be able to show what this

[html-formfu] Can Element::DateTime minutes display quarters

2009-07-02 Thread Ascii King
Can the Element::DateTime element display minutes in the quarter hours only? I would like them to show only: 00, 15, 30, 45. Is this possible? I have checked the documentation and it doesn't seem so. ___ HTML-FormFu mailing list HTML-FormFu@lists.scs

[html-formfu] empty_rows prevents javascript from creating new rows

2009-07-16 Thread Ascii King
I have a Catalyst / DBIC / Formfu setup that has a form that allows for repeatable elements. I also have some javascript code that adds new rows. I took this code from http://www.formassembly.com. This javascript code: * copies the first row of elements in the repeatable (via clone in the DOM)

Re: [html-formfu] Writing Catalyst - FormFu tests

2009-07-30 Thread Ascii King
OK. So, three months later I have the test files done that will test the ability to write to a repeatable nested within another repeatable in HTML-FormFu-Model-DBIC. I am a little afraid to commit these to the trunk(?), though because I don't want to mess up everything. I have attached the tes

Re: [html-formfu] Writing Catalyst - FormFu tests

2009-08-10 Thread Ascii King
n nested repeatables. It now takes $self->counter_name, and then searches up the parent hierarchy for a field matching that name, it then uses that field's nested_name() to retrieve the correct count-value. I'll test and apply your files once the svn build is unbroken :) Cheers, Carl

Re: [html-formfu] Writing Catalyst - FormFu tests

2009-08-17 Thread Ascii King
perly in nested repeatables. It now takes $self->counter_name, and then searches up the parent hierarchy for a field matching that name, it then uses that field's nested_name() to retrieve the correct count-value. I'll test and apply your files once the svn build is unbroken :) Cheers

[html-formfu] Multiple columns for a Select element?

2009-08-18 Thread Ascii King
Is it opossible to display multiple columns in a Select element? I have looked and can't find it in the documentation. ___ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Re: [html-formfu] Multiple columns for a Select element?

2009-08-19 Thread Ascii King
Thanks for the reply, Wolfgang. It is exactly what I was looking for. Wolfgang Kinkeldei wrote: Hi, Am 18.08.2009 um 19:59 schrieb Ascii King: Is it opossible to display multiple columns in a Select element? I have looked and can't find it in the documentation. The YAML definition

[html-formfu] Composite Key for Select element

2009-08-20 Thread Ascii King
I have a select element that is populated by a resultset from a table. However, when I save the form, the select data is not saved. I suspect this is because the select is filled from a table that uses a Composite Key. Is there some way in FormFu to make a select element work with a composit

[html-formfu] Modify the class tag for the options in select elements

2009-08-21 Thread Ascii King
Can I automatically populate the class tag in an option for a select element that is built using a resultset? I have checked the archives, but the closest I came was this code from Carl Franks: http://www.mail-archive.com/html-formfu@lists.scsys.co.uk/msg01569.html I have a select element th

Re: [html-formfu] Need help with repeatable field

2009-08-26 Thread Ascii King
Jorge Augusto Senger wrote: Hi list, I need some advice regarding repeatable elements. I've the following database structure: Table "clients": cli_id*, cli_name Table "clients_tests": cli_id*, tst_id*, tst_result Table "tests": tst_id*, tst_name So, in my clients form, I'd like to have a "ts

Re: [html-formfu] Need help with repeatable field

2009-08-26 Thread Ascii King
# TST_NAME -- - type: Select name: tst_name model_config: Sorry, the name of the select element should be tst_id and not tst_name. # TST_NAME -- - type: Select name: tst_id model_config: ___ HTML-FormFu mailing li

[html-formfu] Can't get element name

2009-09-02 Thread Ascii King
Why doesn't this code return the name and id of the element? I have declared all of my variables, I just didn't include it here. This code will put the title and maxlength attributes of a text field into the Repeatables_List, but not the id or name. The code is supposed to find a text field t

Re: [html-formfu] RFC - Transactions for DBIC updates

2009-09-02 Thread Ascii King
Mario Minati wrote: Hi @all, I need to use transactions for all my db update and create actions. Currently FF:M:DBIC doesn't support this. I'd like to extend the update method to start a transaction, if an attribute is defined (e.g. 'use_transaction'). To avoid nested transactions, as update

Re: [html-formfu] How-to: complex radiogroup/date/select/text element

2009-09-11 Thread Ascii King
Jens Schwarz wrote: Hi, I want to create a more complex element that seems (to me) like a radiogroup. But I can't get it to work. That's the (not working) FormFu-YML-Code I have right now: - type: Radiogroup name: complexelement options: - type: Date name: foo - type: Select

[html-formfu] dynamically filter a Select list

2009-09-14 Thread Ascii King
I want to dynamically filter the amount of data returned when populating a Select field. The select field I am using has too much data and causes the form to load very slowly. I have several of these select boxes, that pull down different data. I need to be able to filter what data gets into

Re: [html-formfu] dynamically filter a Select list

2009-09-14 Thread Ascii King
Byron Young wrote: Ascii King wrote on 2009-09-14: I want to dynamically filter the amount of data returned when populating a Select field. The select field I am using has too much data and causes the form to load very slowly. I have several of these select boxes, that pull down different

Re: [html-formfu] dynamically filter a Select list

2009-09-15 Thread Ascii King
If you go the route of dynamic-population via AJAX you can avoid the 'too much data' problem. Initially don't put any data in the Select list, but once the user starts typing in the filter box do an AJAX query to pull only the filtered values into the Select list. The form should load quick

Re: [html-formfu] dynamically filter a Select list

2009-09-15 Thread Ascii King
I'm not familair with AJAX, but I will look up that route as it seems to be be pretty much exactly what I want. I am also trying the paginated approach right now. I am having trouble passing variables around the different functions, though. (have I mentioned I'm not a strong perl programmer?)

Re: [html-formfu] dynamically filter a Select list

2009-09-15 Thread Ascii King
Ascii King wrote: I'm not familair with AJAX, but I will look up that route as it seems to be be pretty much exactly what I want. I am also trying the paginated approach right now. I am having trouble passing variables around the different functions, though. (have I mentioned I&#x

Re: [html-formfu] dynamically filter a Select list

2009-09-16 Thread Ascii King
is a very lightweight JS library which fits perfectly the needs if Ascii King because he just wants to do an ajax call. Every other library would add lots of code he doesn't need. Prototype is actively developed and very stable. I think it's still one of the best libraries. But, if you

Re: [html-formfu] HTML::FormFu::Model::DBIC and Many-to-many

2009-09-27 Thread Ascii King
Carl Franks wrote: I don't think it's currently possible in a single step, to both select which one's to relate, and edit them. It's either a multi-value element to select them, or a Repeatable block to edit the already related rows. Carl This is something I have been struggling with for ove

Re: [html-formfu] HTML::FormFu::Model::DBIC and Many-to-many

2009-09-27 Thread Ascii King
Ascii King wrote: list_hero.tt2 - Name Skills [% FOREACH hero IN object -%] [% hero.hero_name %] [% FOREACH unique_skill = hero.skills %] [% unique_skill.skill_name %] [[% unique_skill.hero_skill.rank %]] [% END %] [% END

[html-formfu] How to Display a printable copy of the form

2009-10-08 Thread Ascii King
I would like to provide the user with the ability to print out the form with a pretty presentation. I was wondering if there is some automatic way to build this using the YAML config files? this would be nice because it would mean that the printable form would automatically update if the config

Re: [html-formfu] How to Display a printable copy of the form

2009-10-09 Thread Ascii King
Charlie Garrison wrote: Good morning, What is your definition of 'pretty presentation'? For me that is removing all the 'fluff' from the page (navigation bar, advertising images, etc). And that can be achieved with a 'print' media style sheet. No change the form contents is required. Charli

Re: [html-formfu] How to Display a printable copy of the form

2009-10-14 Thread Ascii King
Charlie Garrison wrote: You should be able to do that with a media=print style sheet: Example from . You can change the border, background, display style, etc. for input elements on the form. Radio buttons may pose more of a challenge. It me

[html-formfu] setting default values

2009-10-14 Thread Ascii King
I am unable to set the default value of a field on my form. I am using the following line: $c->stash->{object}->model->default_values( { name => 'tbz' } ); or I can break it down to this: my $form = $c->stash->{object}; $form->model->default_values( { name => 'tbz' } ); But the 'name

Re: [html-formfu] setting default values

2009-10-15 Thread Ascii King
Moritz Onken wrote: From a first glance: $c->stash->{object} is not a formfu object but a DBIC row. You might want to try $c->stash->{form} cheers ___ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/lis

Re: [html-formfu] setting default values

2009-10-18 Thread Ascii King
Carl Franks wrote: Ah, I thought at first you were using HTML::FormFu::Model::HashRef - but I see from the error message it's HTML::FormFu::Model::DBIC. I think you're really just wanting the core form method - not the method on model(): $form->default_values({ \%vals }); Carl That di

Re: [html-formfu] HTML::FormFu::Elements::Repeatable and DBIx::Class

2009-11-26 Thread Ascii King
Benjamin Martin wrote: hello, I have been trying to get the HTML::FormFu::Elements::Repeatable to work with a 'has_many' (DBIx::Class) relationship without success. I am yet to find complete working example, just snippets from perldoc which I am yet to get going :( Can anyone point me towa

[html-formfu] YAML::XS problem

2009-12-07 Thread Ascii King
So, I updated my perl mods and suddenly I get the following error. From reading the mail posts, I think it is because Config::Any is defaulting to using YAML::XS. How do I go about cleaning up these errors (there are a few of them) or should I just revert my Config::Any to an earlier version?

Re: [html-formfu] YAML::XS problem

2009-12-07 Thread Ascii King
Brian Cassidy wrote: Just wrap %n in single quote: '%n' -- that'll make YAML::XS happy. That worked. Thanks. I have one other error now. I suspect it is the same type of problem. The system tries to read a form with a load_config_file command in it and it reports that it cannot find that fi

[html-formfu] load_config_file won't find .yml

2009-12-08 Thread Ascii King
I've just updated a bunch of mods on my system and now I get errors when I use the load_config_file command. This used to work before my updates. config file not found I get this error: Caught exception in OMTSWeb::Controller::Prior->new_prior "config file 'prior/hidden_fields.yml' not found

Re: [html-formfu] load_config_file won't find .yml

2009-12-08 Thread Ascii King
Carl Franks wrote: Can you check the value of $form->config_file_path() for a form while it's running under Catalyst. It should be set to something like: /path/to/app/root/forms Carl I use :FormConfig() to set the path. I don't know how to check the $form->config_file_path() while it's

Re: [html-formfu] load_config_file won't find .yml

2009-12-08 Thread Ascii King
Carl Franks wrote: Doh, I should have considered that! If you remove the FormConfig attribute, so the action runs, then dump $self (the controller), you should find the Catalyst-Controller-HTML-FormFu config in there. It should be under {_html_formfu_config}{constructor}{config_file_path} Carl

  1   2   >