I've been messing with FormFu, and am having a problem with the following config:
<elements> name title type Text label Post title <model_config> resultset Sets delete_if_empty 1 </model_config> </elements> <elements> name display type Text label Shortened Affiliate Link <model_config> resultset Affiliates delete_if_empty 1 </model_config> </elements>
Each element needs to load/update from a different resultset model. To load the values into the form I am having to call default_values($result_set_row) for each table (in this case, twice). When I update, I do basically the same thing, but then I ran into the problem of having rows with empty values instead of the row being deleted. Now I could call a delete on the row, but FormFu has a model_config option called delete_if_empty. Setting this, it deletes everything I call an update on (in this case, 2 updates, one for each table) instead of just the table that is defined in the element tags under resultset. Do I have to check the values myself, and delete the rows if needed? Or is there some config i'm misunderstanding/not setting for FormFu that will make it 'Just Work'? :)

In reply to FormFu, DBIC, and multiple tables by uG

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.