I don’t know the best way to handle what I am doing at this phase of the app…
I have multiple entries that can be edited by clicking a button next to them. The framework is all in place to search for the entry and select an entry to edit. Now I need to enable inline editing. I have looked at a few posts online about this, but most are directed at EE1 or sketchy at best in detail. I would prefer to utilize a dialog/modal to open with the fieldtype of the clicked field. I have a query running to retrieve this already.
My questions come from how is the best way to “push” this change to EE? My content is in an iFrame, so I can refresh it once the data is posted back, but I am unsure the best/preferred way to do this part.
I have never used SAEF forms. I have SAEFCracker, but have yet to use it either.
Does anyone have any suggestions?
Thanks in advance.
For anyone interested in the same or similar usage, I resolved my issues…
This is very basic to try and relate the solution in this post, but essentially, from the main page, the user has selected an entry and is able to change the entry’s template (email template) from a menu which shows them live changes. The SAEF form has a complete list of custom fields for the email entry. Each custom field relates to the channel entry custom fields in the templates. Depending on which template they are viewing, they can click on an ‘edit’ button that displays next to that field in the rendered view and edit that particular field in-line. The entry and field are recorded in a session variable from the main page and everything else is done via jQuery in a dialog modal. The dialog modal opens an embed like this which grabs the currently selected values from the session and displays the proper field to modify then writes it to EE live upon submit.
I hope that made sense… 😝
<?php
session_start();
$entry = $_SESSION['entry'];
$field = $_SESSION['field'];
?>
<!-- QUICKIE STYLES -->
<style type="text/css">
label, input { display: none; }
.showMe { display: block !important; }
</style>
<!-- /QUICKIE STYLES -->
<!-- jQUERY -->
[removed]
var field = "<?php echo $field ?>";
$("."+field).show();
[removed]
<!-- /jQUERY -->
<!-- SEAF form -->
{exp:safecracker channel="my_channel" return="template_group/template" entry_id="<?php echo $entry ?>" include_jquery="no" preserve_checkboxes="yes"}
<label class="field1" for="field1">field1</label>
<input type="text" class="field1" name="field1" id="field1" value="{field1}" size="30" maxlength="350">
<label class="field2" for="field2">field2</label>
<input type="text" class="field2" name="field2" id="field2" value="{field2}" size="30" maxlength="350">
<label class="field3" for="field3">field3</label>
<input type="text" class="field3" name="field3" id="field3" value="{field3}" size="30" maxlength="350">
<input type="submit" class="showMe" name="submit" value="Save" />
{/exp:safecracker}
<!-- /SAEF form -->Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.