This mixed with good CTools export could quickly become a site builder's best friend.. a few friendly suggestions:

1) Move the "Custom PHP" box to a different column than the array dump or modal popup, instead of beneath the array dump. I currently have to write my snippet in an external editor and copy/paste in order to see what I am doing while searching the array. (lots of scrolling back/forth)

AND/OR .. this would be truly excellent:

2) Filter the array dumps with a bit of javascript so when an [#element] is clicked, the full $array['whatever']['this']['#element'][0]['is'] is automatically appended to the 'Custom PHP' box. This will allow someone to quickly scroll through and click on anything they want to change. My recommendation would be to append:

$array['whatever']['this']['#element'][0]['is'] = 'currentvalue';

.. causing it to actually set the 'current' value by default. You wouldn't have to mentally build the array from the top down, you would just click on what you wanted to change and it would populate your PHP box.

Thoughts?

Thanks again,

Jason Fisher
Carr Systems

Comments

lyricnz’s picture

Yes, my intention is to add ctools support (I have a draft here, but haven't had time to work on it recently)

Interesting ideas. Some issues that I can see:

- by putting the textarea next to the array dump, you compromise the available width of both elements. it may be quite awkward to write code in a half-width box

- I would worry about the damage you may do to working code when attempting to navigate the array dump. Perhaps a new button/action saying "add to code" or something

lyricnz’s picture

I haven't implemented what you suggested (yet?), but have added support for using DHTML to display nested data structures. See

#854512: Add support for DHTML display of form data

This may help a bit with your first issue?

Archnemysis’s picture

Thanks for the great module. Here are a couple of more UI suggestions after my first use:

1. Need initial help instructions on admin/settings/form_alter/settings . I see in #721056: Documentation comment #3 you have the starting documentation. I would suggest pulling a couple of sentences from the Usage section to place on this form.

2. After figuring out I needed to record forms first, I went back and saw the table filled in. Consider displaying a message when the table is empty that notifies the user to visit the form first.

3. On the form table, the action listed under Operations is "Create". From my perspective that should be "edit" since what I want to do is edit a form that already exists.

4. On the "Modify Form" page, consider adding a Title or some other visual cue to the text box that displays the existing code so the users knows that field is not a form field, but reports current code.

5. I am not clear on why each field has "- Altered" after it. If this is to indicate that changes have been made, then perhaps I have a bug, since every field on my "Modify Form" page showed altered right off the bat.

6. Would like to see each of the fieldsets on the "Modify Form" page be collapsed by default.

Just some suggestions. - jt

lyricnz’s picture

1. Added.

2. Isn't this duplicate of above?

3. I wanted to distinguish between *starting* to modify a form, and updating it's modifications (most forms won't be modified). Do you have some better language?

4. I don't understand? Please explain

5. Bug - fixed.

6. Changed to collapsed by default.

Archnemysis’s picture

Wow, fast response. Thanks!

Re #2: Not really needed now that the long documentation from #1 is added.

Re #3: I need to think about this more after I have a chance to use the module in more depth. Now that I see you are trying to distinguish between the initial modification and subsequent modifications I see why you used "create".

Re#4: Sorry about that. I am referring to the array dump. I was initially confused and couldn't figure out why I couldn't edit the text (array dump) that appeared in the box. It could just be a product of my current theme. I only just installed the module yesterday and played with it on one site for about 15 minutes. After figuring it out, it was not as confusing.

I also just realized I highjacked a somewhat unrelated thread with these suggestions. Sorry about that as well. - jt